summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr46184.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr46184.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr46184.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr46184.c b/gcc/testsuite/gcc.dg/pr46184.c
new file mode 100644
index 000000000..fafa7f463
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr46184.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O -ftree-vectorize -fno-tree-copy-prop -fno-tree-dce" } */
+
+extern int A[], B[];
+
+void
+foo (int z)
+{
+ int j, i;
+ for (j = 0; j < 32; j++)
+ {
+ int curr_a = A[0];
+ for (i = 0; i < 16; i++)
+ curr_a = A[i] ? curr_a : z;
+ B[j] = curr_a;
+ }
+}
+