summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr59670.c
blob: a68253b4b6373e3f8dc22059f4ee7db4686d4624 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* PR middle-end/59670 */
/* { dg-do compile } */
/* { dg-options "-O1 -fopenmp-simd" } */

int d[1024];

int
foo (int j, int b)
{
  int l, c = 0;
#pragma omp simd reduction(+: c)
  for (l = 0; l < b; ++l)
    c += d[j + l];
  return c;
}