* gcc.dg/20061124-1.c: Add exit() function prototype.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr25805.c
blob71182c52f2ebfa3fa7926ccc8689a87042de42e2
1 /* When -fzero-initialized-in-bss was in effect, we used to only allocate
2 storage for d1.a. */
3 /* { dg-do run } */
4 /* { dg-options "" } */
5 extern void abort (void);
6 extern void exit (int);
8 struct { int a; int x[]; } d1 = { 0, 0 };
9 int d2 = 0;
11 int
12 main ()
14 d2 = 1;
15 if (sizeof (d1) != sizeof (int))
16 abort ();
17 if (d1.x[0] != 0)
18 abort ();
19 exit (0);