1 ! RUN: %python %S/test_errors.py %s %flang_fc1
3 !Shape analysis related tests for SELECT RANK Construct(R1148)
6 integer, dimension(2,3):: arr_pass
16 j
= INT(0, KIND
=MERGE(KIND(0), -1, SIZE(SHAPE(arr
)) == 2)) !arr is dummy
19 subroutine check2(arr
)
23 integer,dimension(-1:10, 20:30) :: brr
27 j
= INT(0, KIND
=MERGE(KIND(0), -1, SIZE(SHAPE(brr
)) == 2)) !brr is local to subroutine
30 subroutine checK3(arr
)
33 INTEGER :: j
,I
,n
=5,m
=5
34 integer,dimension(-1:10, 20:30) :: brr
35 integer :: array(2) = [10,20]
36 REAL, DIMENSION(5, 5) :: A
39 FORALL (i
=1:n
,j
=1:m
,RANK(arr
).EQ
.SIZE(SHAPE(brr
))) &
43 subroutine check4(arr
)
46 REAL, DIMENSION(2,3) :: A
47 REAL, DIMENSION(0:1,0:2) :: B
51 A
= B
!will assign to only same shape after analysing in any order.
54 subroutine check5(arr
)