2 /* { dg-do compile } */
3 /* { dg-options "" } */
5 struct foo
{ int x
; char 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" } */