PR tree-optimization/84740
[official-gcc.git] / gcc / testsuite / gcc.dg / pr25805.c
blob2c083f2034205b4063c2e6ad15ab36c21ec1f5a5
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 /* { dg-skip-if "packed attribute missing for d1" { "epiphany-*-*" } } */
6 extern void abort (void);
7 extern void exit (int);
9 struct { int a; int x[]; } d1 = { 0, 0 };
10 int d2 = 0;
12 int
13 main ()
15 d2 = 1;
16 if (sizeof (d1) != sizeof (int))
17 abort ();
18 if (d1.x[0] != 0)
19 abort ();
20 exit (0);