summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr46184.c
blob: fafa7f463d91c4f3a59b332fc4a7c25ccc92636a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
    }
}