summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/tpl-parallel-2.C
blob: 2dceb093287d3a862287054a36ee5bd984df63a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do compile }

template<typename T>
struct S
{
  T n;
  void test();
  void work();
};

template<typename T>
void S<T>::test()
{
  #pragma omp parallel num_threads(n)	// { dg-error "must be integral" }
    work();
}

template struct S<int>;
template struct S<long>;
template struct S<float>;	// { dg-message "instantiated from here" }