diff options
Diffstat (limited to 'ld/testsuite/ld-size/size-4a.c')
-rw-r--r-- | ld/testsuite/ld-size/size-4a.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ld/testsuite/ld-size/size-4a.c b/ld/testsuite/ld-size/size-4a.c new file mode 100644 index 0000000000..b11089b804 --- /dev/null +++ b/ld/testsuite/ld-size/size-4a.c @@ -0,0 +1,24 @@ +#include <stdio.h> + +char bar[10]; +char foo[20] = { 1 } ; +extern int bar_size1 (void); +extern int bar_size2 (void); +extern int foo_size1 (void); +extern int foo_size2 (void); + +int +main () +{ + int size; + + size = bar_size1 (); + if (size == sizeof (bar) && bar_size2 () == size) + printf ("OK\n"); + + size = foo_size1 (); + if (size == sizeof (foo) && foo_size2 () == size) + printf ("OK\n"); + + return 0; +} |