2018-06-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / Wdeclaration-after-statement-4.c
blobc01d8bc6cf27020c861ded2afd54867210623757
1 /* { dg-do compile } */
2 /* { dg-options "-std=c90 -pedantic -Wno-declaration-after-statement" } */
4 extern void abort (void);
5 extern void exit (int);
7 int
8 main (void)
10 int i = 0;
11 if (i != 0)
12 abort ();
13 i++;
14 if (i != 1)
15 abort ();
16 int j = i;
17 if (j != 1)
18 abort ();
19 struct foo { int i0; } k = { 4 };
20 if (k.i0 != 4)
21 abort ();
22 exit (0);