summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/tpl-master-1.C
blob: cf22e1c3fd3a4a9da0e67396e81b80707e03db29 (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
26
27
28
29
30
// PR c++/24734
// { dg-do compile }
// { dg-options "-fopenmp -fdump-tree-gimple" }

int i;

template <int> void f1 ()
{
  #pragma omp ordered
    i++;
}

template <int> void f2 (bool p)
{
  if (p)
    {
      #pragma omp master
	i++;
    }
}

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

// { dg-final { scan-tree-dump-times "#pragma omp ordered" 1 "gimple" } }
// { dg-final { scan-tree-dump-times "#pragma omp master" 1 "gimple" } }
// { dg-final { cleanup-tree-dump "gimple" } }