summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/flush-1.c
blob: d1a4d4a5bfb2debc35d4fdd5be3a044c3634f06f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple" } */

void f1(void)
{
  #pragma omp flush
}

int x, y, z;

void f2(_Bool p)
{
  if (p)
    {
      #pragma omp flush (x)
    }
  else
    {
      #pragma omp flush (x, y, z)
    }
}

/* { dg-final { scan-tree-dump-times "__sync_synchronize" 3 "gimple" } } */
/* { dg-final { cleanup-tree-dump "gimple" } } */