summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/tpl-parallel-1.C
blob: 886d07e215b1979c6150fa9256989c67fb1b1715 (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 }

int check;

template<typename T> void foo()
{
  check |= sizeof(T);
}

template<typename T>
void bar(void)
{
  #pragma omp parallel if (0)
    foo<T>();
}

int main()
{
  bar<char>();
  bar<short>();
  if (check != (sizeof(char) | sizeof(short)))
    __builtin_trap ();
  return 0;
}