The following code mistakenly passes a 2-byte integer as the first argument to the intrinsic subroutine GET_COMMAND_ARGUMENT. The 8.70 compiler does not detect this error, even if /CHECK or /CHECKMATE is specified.
program test_args
implicit none
character carg*20
integer icount
integer*2 i2 !wrong integer size for arg to GET_COMMAND_ARGUMENT
!
iCount = 1 + COMMAND_ARGUMENT_COUNT()
if(iCount.gt.1) then
i2 = 1
call GET_COMMAND_ARGUMENT(i2, carg)
print *,trim(carg)
endif
end program
When this code is compiled for 32-bit and run with one argument,
s:\lang>test_args xyz
the response is
ÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇ
With /64, the response is a pop up with the message 'integer overflow at address ...'.