PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / redecl-10.c
blob525961e7e3a62c83d031629370457a3ea901f0ef
1 /* Test for multiple declarations and composite types. Check we don't
2 ICE with nested initializers. */
4 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
5 /* { dg-do compile } */
6 /* { dg-options "-g" } */
8 static int w[];
9 void
10 f (void)
12 extern int w[] = { 1, 2 }; /* { dg-error "has both" } */
15 int x[]; /* { dg-warning "array 'x' assumed to have one element" } */
16 void
17 g (void)
19 extern int x[] = { 3, 4, 5 }; /* { dg-error "has both" } */
22 static int y[];
23 void
24 h (void)
26 extern int y[] = { 6 }; /* { dg-error "has both" } */
29 int z[]; /* { dg-warning "array 'z' assumed to have one element" } */
30 void
31 i (void)
33 extern int z[] = { 7 }; /* { dg-error "has both" } */