aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000605-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000605-2.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000605-2.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000605-2.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000605-2.c
new file mode 100644
index 000000000..8a49bc6da
--- /dev/null
+++ b/gcc-4.9/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);
+}