2 ! Tests the fix for PR35759 and PR35756 in which the dependencies
3 ! led to an incorrect use of the "simple where", gfc_trans_where_3.
5 ! Contributed by Dick Hendrickson <dick.hendrickson@gmail.com>
7 logical :: la(6) = (/(2*(i
/2) /= i
, i
= 1, 6)/), lb(6)
11 ! The first version of the fix caused this to regress as pointed
12 ! out by Dominique d'Humieres
20 if (any(la
.eqv
. lb
)) call abort()
24 integer :: UDA1R(6), expected(6) = (/2,0,5,0,3,0/)
27 uda1r
= (/1,2,3,4,5,6/)
28 lda
= (/ (i
/2*2 .ne
. I
, i
=1,5) /)
30 UDA1L(1:5) = UDA1R(2:6)
32 UDA1L(2:6) = UDA1R(6:2:-1)
34 if (any (expected
/= uda1l
)) call abort
38 INTEGER ILA(10), CLA(10)
40 ILA
= (/ (I
, i
=1,10) /)
41 LDA
= (/ (i
/2*2 .ne
. I
, i
=1,10) /)
52 IF (any (CLA
/= ILA
)) call abort
55 INTEGER FUNCTION R_MY_MAX_I(A
)
57 R_MY_MAX_I
= MAXVAL(A
)
58 END FUNCTION R_MY_MAX_I
60 INTEGER FUNCTION R_MY_MIN_I(A
)
62 R_MY_MIN_I
= MINVAL(A
)
63 END FUNCTION R_MY_MIN_I