summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c++/master-1.C
blob: 734b4e2cd98e72528ec6ffc734c5a56480073b8d (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
// PR c++/24734
// { dg-do run }

extern "C" void abort ();
int i;

template<int> void
foo ()
{
  #pragma omp parallel
    {
    #pragma omp master
      i++;
    }
}

int
main ()
{
  foo<0> ();
  if (i != 1)
    abort ();
  return 0;
}