URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [gomp/] [parallel-4.C] - Rev 154
Compare with Previous | Blame | View Log
/* { 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 ();
}
}