blob: ca06aeef9ef72250b4c003553bcb67af20a9c2ad (
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 } */
extern int foo(void);
extern void bar(void);
int main ()
{
/* Malformed uses of 'if' and 'num_threads'. */
#pragma omp parallel if (foo () > 10) if (foo () == 3) /* { dg-error "too many" } */
{
bar ();
}
#pragma omp parallel num_threads (3) num_threads (20) /* { dg-error "too many" } */
{
bar ();
}
/* Valid uses of 'if' and 'num_threads'. */
#pragma omp parallel if (foo () == 10) num_threads (foo ())
{
bar ();
}
}
|