gcc/testsuite/gcc.c-torture/execute/pr38819.c
raw| 1 | extern void exit (int); |
| 2 | extern void abort (void); |
| 3 | |
| 4 | volatile int a = 1; |
| 5 | volatile int b = 0; |
| 6 | volatile int x = 2; |
| 7 | volatile signed int r = 8; |
| 8 | |
| 9 | void __attribute__((noinline)) |
| 10 | foo (void) |
| 11 | { |
| 12 | exit (0); |
| 13 | } |
| 14 | |
| 15 | int |
| 16 | main (void) |
| 17 | { |
| 18 | int si1 = a; |
| 19 | int si2 = b; |
| 20 | int i; |
| 21 | |
| 22 | for (i = 0; i < 100; ++i) { |
| 23 | foo (); |
| 24 | if (x == 8) |
| 25 | i++; |
| 26 | r += i + si1 % si2; |
| 27 | } |
| 28 | abort (); |
| 29 | } |