When the test program below is compiled with /64 /checkmate and run in SDBG64 and run until Line-16, the first executable statement in the subroutine, the variables pane shows n = 4214920, and indi = [37813896, 0, 4214920, 0, 37813916]. Note that the third element has the same value shown as for n. Hovering the mouse pointer over 'n' in the source line also displays the incorrect value 4214920.
program tst
implicit none
integer ind(5),i
!
do i=1,5
ind(i) = i*i
end do
call sub(ind,5)
print *, ind
end program tst
subroutine sub(indi,n)
implicit none
integer n,indi(n)
!
indi(1:n) = indi(1:n)+2
return
end subroutine sub
If the EXE is run from the command line, the output results are correct, so I suspect that it is just the variable display in the debugger that is a bit mixed up.
The entire problem disappears if the subroutine is CONTAINed in the program.

