summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/appendix-a/a.37.1.c
blob: 3581ee27d7dabdb9227812b2aaecb56eaee86e5b (plain)
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);
}