gcc/testsuite/gcc.c-torture/execute/20061101-1.c
raw| 1 | /* PR rtl-optimization/28970 */ |
| 2 | /* Origin: Peter Bergner <[email protected]> */ |
| 3 | /* { dg-require-effective-target int32plus } */ |
| 4 | |
| 5 | extern void abort (void); |
| 6 | |
| 7 | int tar (int i) |
| 8 | { |
| 9 | if (i != 36863) |
| 10 | abort (); |
| 11 | |
| 12 | return -1; |
| 13 | } |
| 14 | |
| 15 | void bug(int q, int bcount) |
| 16 | { |
| 17 | int j = 0; |
| 18 | int outgo = 0; |
| 19 | |
| 20 | while(j != -1) |
| 21 | { |
| 22 | outgo++; |
| 23 | if (outgo > q-1) |
| 24 | outgo = q-1; |
| 25 | j = tar (outgo*bcount); |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | int main(void) |
| 30 | { |
| 31 | bug(5, 36863); |
| 32 | return 0; |
| 33 | } |