111
|
1 /* { dg-do compile } */
|
|
2 /* { dg-options "" } */
|
|
3
|
|
4 typedef char T[];
|
|
5 struct foo { int x; T y; };
|
|
6 struct bar { struct foo f; };
|
|
7 struct baz { struct bar b; };
|
|
8
|
|
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" } */
|