summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/for-12.C
blob: 98318d7d5aec216412e4f1c8f145ac9c6d7d8c99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
int foo (void)
{
  int i, a;

  a = 30;

  #pragma omp parallel for lastprivate (a)
  for (i = 0; i < 10; i++)
    a = a + i;

  return a;
}