Again on gfortran for Mac OS-X
Paul Thomas
paulthomas2@wanadoo.fr
Sun Jan 6 00:07:00 GMT 2008
FX,
>
> I can confirm that your program below also crashed on x86_64-linux
> with gfortran-4.3.0-20071206. I have no access to any other compiler
> at the moment, but your code seem (at first glance) legal; someone
> else here will probably have a more definite opinion on that matter.
> From the output of -fdump-tree-original, it looks like the compiler
> deallocates your allocated derived type on exit of the mah subroutine;
> if this code is indeed legal, then fixing the bug might simply be a
> matter of not performing this automatic deallocation for saved variables.
>
I just posted it as PR34681 - the problem arises because t.data is
nullified one each entry to 'mah'.
Cheers
Paul
More information about the Fortran
mailing list