aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/vect-simd-3.c
blob: ff7f0dcc7a416546580353f7d12d76987204bf7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile } */
/* { dg-require-effective-target vect_int } */
/* { dg-additional-options "-fopenmp-simd" } */

#define N 1024
int a[N];

void
foo (void)
{
  int c = 0;
  #pragma omp simd if (c)
  for (int i = 0; i < N; ++i)
    a[i] = a[i] + 1;
}

/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" } } */