A dummy argument that is an explicit-shape array must conform in size and shape to the associated actual argument
PROGRAM Main IMPLICIT NONE INTEGER, DIMENSION(8,8) :: A1 INTEGER, DIMENSION(64) :: A2 INTEGER, DIMENSION(16,32) :: A3 ... CALL subby(A1) ! OK CALL subby(A2) ! ERROR CALL subby(A3(::2,::4)) ! OK CALL subby(RESHAPE(A2,(/8,8/)) ! OK ... CONTAINS SUBROUTINE subby(expl_shape) INTEGER, DIMENSION(8,8) :: expl_shape ... END SUBROUTINE subby END PROGRAM Main
For more information, click here