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

void
work (int i, int j)
{
}

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