aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/gomp/taskloop-reduction-1.c
blob: 0df073fde74f1ccc8539a5c1134c15ac9cd84517 (plain)
1
2
3
4
5
6
7
8
9
10
int
foo (int *a)
{
  int x = 0;
  #pragma omp taskloop reduction (+:x) nogroup	/* { dg-error "'nogroup' clause must not be used together with 'reduction' clause" } */
  for (int i = 0; i < 64; i++)
    x += a[i];
  #pragma omp taskwait
  return x;
}