gcc/testsuite/gcc.c-torture/execute/pr60017.c
raw| 1 | /* PR target/60017 */ |
| 2 | |
| 3 | extern void abort (void); |
| 4 | |
| 5 | struct S0 |
| 6 | { |
| 7 | short m0; |
| 8 | short m1; |
| 9 | }; |
| 10 | |
| 11 | struct S1 |
| 12 | { |
| 13 | unsigned m0:1; |
| 14 | char m1[2][2]; |
| 15 | struct S0 m2[2]; |
| 16 | }; |
| 17 | |
| 18 | struct S1 x = { 1, {{2, 3}, {4, 5}}, {{6, 7}, {8, 9}} }; |
| 19 | |
| 20 | struct S1 func (void) |
| 21 | { |
| 22 | return x; |
| 23 | } |
| 24 | |
| 25 | int main (void) |
| 26 | { |
| 27 | struct S1 ret = func (); |
| 28 | |
| 29 | if (ret.m2[1].m1 != 9) |
| 30 | abort (); |
| 31 | |
| 32 | return 0; |
| 33 | } |