summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr42215.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr42215.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr42215.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr42215.c b/gcc/testsuite/gcc.dg/pr42215.c
new file mode 100644
index 000000000..e5a75bd30
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr42215.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-loop-distribution" } */
+
+extern int A[];
+extern int B[];
+
+void f(int i)
+{
+ while (i-- > 0) {
+ A[i] = 0;
+ B[i] = 0;
+ }
+}