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

void
wrong4 (int n)
{
#pragma omp parallel default(shared)
  {
    int i;
#pragma omp for
    for (i = 0; i < n; i++)
      {
	work (i, 0);
	/* incorrect nesting of barrier region in a loop region */
#pragma omp barrier	/* { dg-warning "may not be closely nested" } */
	work (i, 1);
      }
  }
}