1 2 3 4 5 6 7 8 9 10 11 12 13
/* { dg-do compile } */ extern int omp_get_num_threads (void); void work (int i); void incorrect () { int np, i; np = omp_get_num_threads (); /* misplaced */ #pragma omp parallel for schedule(static) for (i = 0; i < np; i++) work (i); }