gcc/testsuite/g++.dg/gomp/tpl-parallel-2.C
raw| 1 | // { dg-do compile } |
| 2 | |
| 3 | template<typename T> |
| 4 | struct S |
| 5 | { |
| 6 | T n; |
| 7 | void test(); |
| 8 | void work(); |
| 9 | }; |
| 10 | |
| 11 | template<typename T> |
| 12 | void S<T>::test() |
| 13 | { |
| 14 | #pragma omp parallel num_threads(n) // { dg-error "must be integral" } |
| 15 | work(); |
| 16 | } |
| 17 | |
| 18 | template struct S<int>; |
| 19 | template struct S<long>; |
| 20 | template struct S<float>; // { dg-message "required from here" } |