1 // RUN: %libomp-compile-and-run
4 #include "omp_testsuite.h"
6 /* Utility function to check that i is increasing monotonically
8 static int check_i_islarger (int i
)
14 islarger
= ((i
>= last_i
)&&(i
- last_i
<=1));
19 int test_omp_for_collapse()
27 #pragma omp for private(i,j) schedule(static,1) collapse(2) ordered
28 for (i
= 1; i
< 100; i
++) {
29 for (j
=1; j
<100; j
++) {
31 my_islarger
= check_i_islarger(i
)&&my_islarger
;
35 is_larger
= is_larger
&& my_islarger
;
45 for(i
= 0; i
< REPETITIONS
; i
++) {
46 if(!test_omp_for_collapse()) {