summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/appendix-a/a.30.1.c
blob: e34be4c42961a4d70fd755318a8b49e188d4db20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */

void
a30 (int n, float *a, float *b)
{
  int i;
#pragma omp parallel
  {
#pragma omp for lastprivate(i)
    for (i = 0; i < n - 1; i++)
      a[i] = b[i] + b[i + 1];
  }
  a[i] = b[i];			/* i == n-1 here */
}