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

void
a20_wrong ()
{
  int a = 1;
#pragma omp parallel
  {
    if (a != 0)
#pragma omp flush(a)	/* { dg-error "'#pragma omp flush' may only" } */
/* incorrect as flush cannot be immediate substatement
    of if statement */
      if (a != 0)
#pragma omp barrier	/* { dg-error "'#pragma omp barrier' may only" } */
/* incorrect as barrier cannot be immediate substatement
    of if statement */
  }
}