1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! TODO: crashes compiler mysteriously when built with MSVC since patch
3 ! 10b990a03b1ede533b8443edffa3607aae4295c7n or maybe earlier
4 ! UNSUPPORTED: system-windows
6 !Shape analysis related tests for SELECT RANK Construct(R1148)
9 integer, dimension(2,3):: arr_pass
19 j
= INT(0, KIND
=MERGE(KIND(0), -1, SIZE(SHAPE(arr
)) == 2)) !arr is dummy
22 subroutine check2(arr
)
26 integer,dimension(-1:10, 20:30) :: brr
30 j
= INT(0, KIND
=MERGE(KIND(0), -1, SIZE(SHAPE(brr
)) == 2)) !brr is local to subroutine
33 subroutine checK3(arr
)
36 INTEGER :: j
,I
,n
=5,m
=5
37 integer,dimension(-1:10, 20:30) :: brr
38 integer :: array(2) = [10,20]
39 REAL, DIMENSION(5, 5) :: A
42 FORALL (i
=1:n
,j
=1:m
,RANK(arr
).EQ
.SIZE(SHAPE(brr
))) &
46 subroutine check4(arr
)
49 REAL, DIMENSION(2,3) :: A
50 REAL, DIMENSION(0:1,0:2) :: B
54 A
= B
!will assign to only same shape after analysing in any order.
57 subroutine check5(arr
)