3 static int f1count
[3], f2count
[3];
6 extern void abort (void);
8 extern "C" void abort (void);
11 int f1 (int depth
, int iter
)
17 int f2 (int depth
, int iter
)
23 void s1 (int a1
, int a2
, int a3
)
27 #pragma omp for collapse(3)
28 for (i
= 0; i
< a1
; i
++)
31 for (j
= 0; j
< a2
; j
++)
34 for (k
= 0; k
< a3
; k
++)
57 /* All intervening code at the same depth must be executed the same
59 if (f1count
[0] != f2count
[0]) abort ();
60 if (f1count
[1] != f2count
[1]) abort ();
61 if (f1count
[2] != f2count
[2]) abort ();
63 /* Intervening code must be executed at least as many times as the loop
65 if (f1count
[0] < 3) abort ();
66 if (f1count
[1] < 3 * 4) abort ();
68 /* Intervening code must not be executed more times than the number
69 of logical iterations. */
70 if (f1count
[0] > 3 * 4 * 5) abort ();
71 if (f1count
[1] > 3 * 4 * 5) abort ();
73 /* Check that the innermost loop body is executed exactly the number
74 of logical iterations expected. */
75 if (f1count
[2] != 3 * 4 * 5) abort ();