gcc/testsuite/c-c++-common/torture/pr60026.c
raw| 1 | /* PR ipa/60026 */ |
| 2 | /* { dg-do compile } */ |
| 3 | |
| 4 | struct S { int f; } a; |
| 5 | |
| 6 | __attribute__((optimize (0))) |
| 7 | struct S foo (int x, struct S y) |
| 8 | { |
| 9 | int b = y.f; |
| 10 | return a; |
| 11 | } |
| 12 | |
| 13 | void |
| 14 | bar () |
| 15 | { |
| 16 | while (a.f) |
| 17 | { |
| 18 | struct S c = {0}; |
| 19 | foo (0, c); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | int |
| 24 | main () |
| 25 | { |
| 26 | bar (); |
| 27 | return 0; |
| 28 | } |