gcc/testsuite/gcc.c-torture/execute/loop-9.c
raw| 1 | /* Source: Neil Booth, from PR # 115. */ |
| 2 | /* { dg-additional-options "-std=gnu17" } */ |
| 3 | |
| 4 | int false() |
| 5 | { |
| 6 | return 0; |
| 7 | } |
| 8 | |
| 9 | extern void abort (void); |
| 10 | |
| 11 | int main (int argc,char *argv[]) |
| 12 | { |
| 13 | int count = 0; |
| 14 | |
| 15 | while (false() || count < -123) |
| 16 | ++count; |
| 17 | |
| 18 | if (count) |
| 19 | abort (); |
| 20 | |
| 21 | return 0; |
| 22 | } |