4 integer, save :: f1count(3), f2count(3)
15 ! All intervening code at the same depth must be executed the same
17 if (f1count(1) /= f2count(1)) error
stop 101
18 if (f1count(2) /= f2count(2)) error
stop 102
19 if (f1count(3) /= f2count(3)) error
stop 103
21 ! Intervening code must be executed at least as many times as the loop
23 if (f1count(1) < 3) error
stop 111
24 if (f1count(2) < 3 * 4) error
stop 112
26 ! Intervening code must not be executed more times than the number
27 ! of logical iterations.
28 if (f1count(1) > 3 * 4 * 5) error
stop 121
29 if (f1count(2) > 3 * 4 * 5) error
stop 122
31 ! Check that the innermost loop body is executed exactly the number
32 ! of logical iterations expected.
33 if (f1count(3) /= 3 * 4 * 5) error
stop 131
37 subroutine f1 (depth
, iter
)
38 integer :: depth
, iter
39 f1count(depth
) = f1count(depth
) + 1
42 subroutine f2 (depth
, iter
)
43 integer :: depth
, iter
44 f2count(depth
) = f2count(depth
) + 1
47 subroutine s1 (a1
, a2
, a3
)