I found a regression in FTN95/64. Consider the following program:
module bar
implicit none
contains
subroutine foo()
integer, pointer :: p => null()
write(*,*) loc(p)
end subroutine
end module
program pointer
use bar
implicit none
call foo()
end program
Compiled with
ftn95 main.f90 /link
this works just fine (gives 0 as output). However, if I compile with
ftn95 /64 main.f90 /link
my output is 8589934592, which is definitely wrong. This worked fine for FTN95 8.10.
Interestingly, if foo is external (i.e. not defined within a CONTAINS scope) or if I define the pointer within the main PROGRAM, the problem does not seem to appear.
Part 2:
Even more interesting, if I add a NULLIFY(p) just below the pointer definition, FTN64 gives me the following weird error message:
This is definitely a bug (and also a regression to FTN95 8.10).
...continuation: Part 2 is even more involved than I first thought. Consider the following code:
module bar
implicit none
contains
subroutine foo()
integer, pointer :: p => null()
write(*,*) loc(p)
end subroutine
end module
program pointer
implicit none
integer, pointer :: pp => null()
nullify(pp)
write(*,*) loc(pp)
end program
Same weird error message in 64 bit. However if I remove subroutine foo (which I am not using anyway), the program works fine again. Everything works fine in FTN 8.10.