gcc/testsuite/gcc.dg/torture/pr111917.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-additional-options "-funswitch-loops" } */ |
| 3 | |
| 4 | long t; |
| 5 | long a() { |
| 6 | long b = t, c = t; |
| 7 | for (; b < 31; b++) |
| 8 | c <<= 1; |
| 9 | return c; |
| 10 | } |
| 11 | long t1; |
| 12 | static |
| 13 | int d() { |
| 14 | if (!t1) |
| 15 | return 0; |
| 16 | e: |
| 17 | f: |
| 18 | for (; a();) |
| 19 | ; |
| 20 | goto f; |
| 21 | return 0; |
| 22 | } |
| 23 | int main() { d(); } |