PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / c99-flex-array-typedef-8.c
blob26c4a23428ca8941d0d71648c2e76fe5a3857e62
1 /* { dg-do compile } */
2 /* { dg-options "" } */
4 typedef char T[];
5 struct foo { int x; T y; };
6 struct bar { struct foo f; };
7 struct baz { struct bar b; };
9 struct foo a1 = { 1, "abc" };
10 struct foo a2 = { 1, { "abc" } };
11 struct foo b1[] = { { 1, "abc" } }; /* { dg-error "initialization of flexible array member" } */
12 struct foo b2[] = { { 1, { "abc" } } }; /* { dg-error "initialization of flexible array member" } */
13 struct bar c1[] = { { { 1, "abc" } } }; /* { dg-error "initialization of flexible array member" } */
14 struct bar c2[] = { { { 1, { "abc" } } } }; /* { dg-error "initialization of flexible array member" } */
15 struct baz d1[] = { { { { 1, "abc" } } } }; /* { dg-error "initialization of flexible array member" } */
16 struct baz d2[] = { { { { 1, { "abc" } } } } }; /* { dg-error "initialization of flexible array member" } */