(Re)allocation of allocatable arrays on assignment - F2003
Dominique Dhumieres
dominiq@lps.ens.fr
Sat Oct 23 16:51:00 GMT 2010
Paul,
Withe the latest patch, rnflow.f90 gives an ICE: reduced test
subroutine evlrnf (nclsm)
implicit none
integer, intent (in) :: nclsm
real, allocatable, dimension (:,:) :: dtrsft
real, allocatable, dimension (:) :: vwrk1t
allocate (dtrsft (1:nclsm,1:nclsm))
dtrsft = 0.0
allocate (vwrk1t (1:nclsm))
vwrk1t = dtrsft (nclsm, 1:nclsm)
deallocate (dtrsft)
deallocate (vwrk1t)
end subroutine evlrnf
[macbook] lin/test% gfc -c evlrnf_red.f90
evlrnf_red.f90: In function 'evlrnf':
evlrnf_red.f90:9:0: internal compiler error: in fold_binary_loc, at fold-const.c:9411
This is the same location than the ICE I see after removing the comment
in your test.
Also with -O2 and above valgrind complains with the executable for the
original test:
==13063== Conditional jump or move depends on uninitialised value(s)
==13063== at 0x100001AA9: MAIN__ (in ./a.out)
Otherwise the failures reported previously have been fixed.
Thanks,
Dominique
More information about the Fortran
mailing list