gcc/testsuite/gcc.c-torture/execute/990525-1.c
raw| 1 | void abort (void); |
| 2 | void exit (int); |
| 3 | |
| 4 | struct blah { |
| 5 | int m1, m2; |
| 6 | }; |
| 7 | |
| 8 | void die(struct blah arg) |
| 9 | { |
| 10 | int i ; |
| 11 | struct blah buf[1]; |
| 12 | |
| 13 | for (i = 0; i < 1 ; buf[i++] = arg) |
| 14 | ; |
| 15 | if (buf[0].m1 != 1) { |
| 16 | abort (); |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | int main() |
| 21 | { |
| 22 | struct blah s = { 1, 2 }; |
| 23 | |
| 24 | die(s); |
| 25 | exit (0); |
| 26 | } |