summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/pr33372-3.C
blob: 8220f3c5ab818c434df4afbe7cae3b84391016a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// PR c++/33372
// { dg-do compile }
// { dg-options "-fopenmp" }

template <typename T>
void f ()
{
  T n = 6;
#pragma omp parallel num_threads(n)	// { dg-error "num_threads expression must be integral" }
  ;
#pragma omp parallel for schedule(static, n)
  for (int i = 0; i < 10; i++)		// { dg-error "chunk size expression must be integral" }
    ;
}

void g ()
{
  f<double> ();
}