summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/tpl-barrier-1.C
blob: 60567d910284d44b8d1120bd30494bcce54aa9e8 (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
25
// PR c++/24735
// { dg-do compile }
// { dg-options "-fopenmp -fdump-tree-gimple" }

template <int> void f1 ()
{
  #pragma omp barrier
}

template <int> void f2 (bool p)
{
  if (p)
    {
      #pragma omp barrier
    }
}

void f3 ()
{
  f1<0> ();
  f2<0> (true);
}

// { dg-final { scan-tree-dump-times "GOMP_barrier" 2 "gimple" } }
// { dg-final { cleanup-tree-dump "gimple" } }