PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / array-11.c
blob3b216a38e062557b843368afe889aeb0d4c3deff
1 /* { dg-do compile } */
2 /* { dg-options "" } */
4 /* Verify that we can't do things to get ourselves in trouble
5 with GCC's initialized flexible array member extension. */
7 typedef int T[];
8 struct f { int w; T x; };
9 struct g { struct f f; };
10 struct g g1 = { { 0, { } } };
11 struct g g2 = { { 0, { 1 } } }; /* { dg-error "nested context" "nested" } */
12 /* { dg-message "near init" "near" { target *-*-* } .-1 } */
13 struct h { int x[0]; int y; };
14 struct h h1 = { { 0 }, 1 }; /* { dg-warning "excess elements" "excess" } */
15 /* { dg-message "near init" "before end" { target *-*-* } .-1 } */