Passed array with more elements that expected in subroutine
问题 I have a subroutine in a shared library: SUBROUTINE DLLSUBR(ARR) IMPLICIT NONE INTEGER, PARAMETER :: N = 2 REAL ARR(0:N) arr(0) = 0 arr(1) = 1 arr(2) = 2 END And let's assume I will call it from executable by: REAL ARR(0:3) CALL DLLSUBR(ARR) Note: The code happily compiles and runs (DLLSUBR is inside a module) without any warning or error in Debug + /check:all option switched on. Could this lead to memory corruption or some weird behaviour? Where I can find info about passing array with