| 1 |
/* PR c/60784 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-Wextra -std=c99" } */ |
| 4 |
|
| 5 |
struct A { int i, j; }; |
| 6 |
struct B { struct A a; } b1 = { .a.i = 1, .a.j = 1 }; |
| 7 |
struct B b2 = { .a.i = 1 }; |
| 8 |
|
| 9 |
struct C { struct { int a, b; }; } c1 = { .a = 4, .b = 2 }; |
| 10 |
struct C c2 = { .a = 4, .b = 2 }; |
| 11 |
|
| 12 |
struct D { struct A a; }; |
| 13 |
struct E { struct D d; }; |
| 14 |
struct F { struct E e; } f1 = { .e.d.a.i = 8 }; |
| 15 |
struct F f2 = { .e.d.a.i = 8, .e.d.a.j = 3 }; |
| 16 |
|
| 17 |
struct G { |
| 18 |
struct { |
| 19 |
struct { |
| 20 |
struct { |
| 21 |
int a, b, c, d, e, f; |
| 22 |
}; |
| 23 |
}; |
| 24 |
}; |
| 25 |
} g = { .b = 2 }; |