gcc/testsuite/gcc.c-torture/execute/20030109-1.c
raw| 1 | /* PR c/8032 */ |
| 2 | /* Verify that an empty initializer inside a partial |
| 3 | parent initializer doesn't confuse GCC. */ |
| 4 | |
| 5 | void abort (void); |
| 6 | |
| 7 | struct X |
| 8 | { |
| 9 | int a; |
| 10 | int b; |
| 11 | int z[]; |
| 12 | }; |
| 13 | |
| 14 | struct X x = { .b = 40, .z = {} }; |
| 15 | |
| 16 | int main () |
| 17 | { |
| 18 | if (x.b != 40) |
| 19 | abort (); |
| 20 | |
| 21 | return 0; |
| 22 | } |