28 Sep 2024 5:49
#31573
This demo won't compile with the array assignment line and without it the SHAPE of the section is wrong.
program section
real(8) :: A(3,2) = 42D0, C(2,2) = 0D0
print *, SHAPE(A(1:2,1:2)) ! FTN95 gives 3 2 instead of 2 2
C = A(1:2,1:2) ! FTN95: *** Error 331: Non-conformant array shapes in first rank of an array expression (2 and 3)
print *, C
end program
Tried debug and release builds with FTN95 9.00.0 and then tried the 9.05.0 updates. (I am building with /ALT_KINDS.)