diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/20000605-2.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20000605-2.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000605-2.c b/gcc/testsuite/gcc.c-torture/execute/20000605-2.c new file mode 100644 index 000000000..8a49bc6da --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20000605-2.c @@ -0,0 +1,18 @@ +struct F { int i; }; + +void f1(struct F *x, struct F *y) +{ + int timeout = 0; + for (; ((const struct F*)x)->i < y->i ; x->i++) + if (++timeout > 5) + abort (); +} + +main() +{ + struct F x, y; + x.i = 0; + y.i = 1; + f1 (&x, &y); + exit (0); +} |