summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/pr33372-1.C
blob: 62900bf65d2dfec9e173b643046145d95db40427 (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 ()
{
  extern T n ();
#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<int> ();
}