aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr41101.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr41101.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr41101.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr41101.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr41101.c
new file mode 100644
index 000000000..8d21a00ce
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr41101.c
@@ -0,0 +1,19 @@
+int func(int);
+
+void
+bug(int* x, int* y, unsigned long int N)
+{
+ unsigned long int i;
+ int* t;
+
+ while (1)
+ {
+ for (i=1; i<=N; i++)
+ {
+ y[i] = func(x[i] - x[1]);
+ if (y[i])
+ return;
+ }
+ t=x; x=y; y=t;
+ }
+}