gcc/testsuite/gcc.c-torture/execute/20000605-2.c
raw| 1 | void abort (void); |
| 2 | void exit (int); |
| 3 | |
| 4 | struct F { int i; }; |
| 5 | |
| 6 | void f1(struct F *x, struct F *y) |
| 7 | { |
| 8 | int timeout = 0; |
| 9 | for (; ((const struct F*)x)->i < y->i ; x->i++) |
| 10 | if (++timeout > 5) |
| 11 | abort (); |
| 12 | } |
| 13 | |
| 14 | int |
| 15 | main(void) |
| 16 | { |
| 17 | struct F x, y; |
| 18 | x.i = 0; |
| 19 | y.i = 1; |
| 20 | f1 (&x, &y); |
| 21 | exit (0); |
| 22 | } |