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

void
wrong5 (int n)
{
#pragma omp parallel
  {
#pragma omp critical
    {
      work (n, 0);
/* incorrect nesting of barrier region in a critical region */
#pragma omp barrier
      work (n, 1);
    }
  }
}