gcc/testsuite/gcc.dg/torture/pr61438.c
raw| 1 | /* { dg-do run } */ |
| 2 | |
| 3 | extern void abort (void); |
| 4 | |
| 5 | int a, c, **d, e, g; |
| 6 | static int b = 1; |
| 7 | |
| 8 | struct |
| 9 | { |
| 10 | int f0; |
| 11 | } f; |
| 12 | |
| 13 | void |
| 14 | foo () |
| 15 | { |
| 16 | int h, *i = &a; |
| 17 | for (; e;) |
| 18 | { |
| 19 | for (c = 0; c < 1; c++) |
| 20 | for (; b;) |
| 21 | ; |
| 22 | for (;;) |
| 23 | { |
| 24 | if (a) |
| 25 | { |
| 26 | for (; f.f0; f.f0++) |
| 27 | ; |
| 28 | if (g) |
| 29 | break; |
| 30 | } |
| 31 | for (h = 0; h < 2; h++) |
| 32 | { |
| 33 | i = *d; |
| 34 | if (!i) |
| 35 | abort (); |
| 36 | } |
| 37 | } |
| 38 | } |
| 39 | if (!i) |
| 40 | abort (); |
| 41 | } |
| 42 | |
| 43 | int |
| 44 | main () |
| 45 | { |
| 46 | foo (); |
| 47 | return 0; |
| 48 | } |