OSDN Git Service

* c-decl.c (grokfield): Allow typedefs for anonymous structs and
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pr25805.c
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);
7
8 struct { int a; int x[]; } d1 = { 0, 0 };
9 int d2 = 0;
10
11 int
12 main ()
13 {
14   d2 = 1;
15   if (sizeof (d1) != sizeof (int))
16     abort ();
17   if (d1.x[0] != 0)
18     abort ();
19   exit (0);
20 }