4 extern void abort (void);
6 extern "C" void abort (void);
9 static int inner_loop_count
= 0;
10 static int intervening_code_count
= 0;
19 foo (int imax
, int jmax
)
23 #pragma omp for collapse(2)
24 for (int i
= 0; i
< imax
; ++i
)
26 /* All the intervening code at the same level must be executed
27 the same number of times. */
28 ++intervening_code_count
;
29 for (int j
= 0; j
< jmax
; ++j
)
33 /* This is the outer j, not the one from the inner collapsed loop. */
43 if (j
!= intervening_code_count
)
45 if (inner_loop_count
!= 5 * 3)
47 if (intervening_code_count
< 5 || intervening_code_count
> 5 * 3)