summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/appendix-a/a.21.3.c
blob: 4d1ed6a52866587f41cb6fa17a69e671de130ddd (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);

void
a21_good (int n)
{
  int i;
#pragma omp for ordered
  for (i = 0; i < n; i++)
    {
      if (i <= 10)
	{
#pragma omp ordered
	  work (i);
	}
      if (i > 10)
	{
#pragma omp ordered
	  work (i + 1);
	}
    }
}