gcc/testsuite/gcc.dg/torture/pr64091.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-additional-options "-g" } */ |
| 3 | |
| 4 | extern int foo(void); |
| 5 | |
| 6 | int main(void) |
| 7 | { |
| 8 | int i, a, b; |
| 9 | |
| 10 | if (foo()) |
| 11 | return 0; |
| 12 | |
| 13 | for (i = 0, a = 0, b = 0; i < 3; i++, a++) |
| 14 | { |
| 15 | if (foo()) |
| 16 | break; |
| 17 | |
| 18 | if (b += a) |
| 19 | a = 0; |
| 20 | } |
| 21 | |
| 22 | if (!a) |
| 23 | return 2; |
| 24 | |
| 25 | b += a; |
| 26 | |
| 27 | return 0; |
| 28 | } |