SAVE and derived types with allocatables (F03)
Andrew Pinski
pinskia@gmail.com
Tue Mar 13 20:34:00 GMT 2007
On 3/13/07, Salvatore Filippone <salvatore.filippone@uniroma2.it> wrote:
> Hello,
> I just found this, and I believe to be a bug. If the list agrees I'll
> open a PR (this looks downright embarassing....)
it is obvious from the tree dump, what is going on:
static struct foo_type f_a = {};
f_a.mv.data = 0B;
So save is done correctly but allocatables in the derived type is not.
Even at the end of the function:
{
int4 D.965;
_gfortran_deallocate (f_a.mv.data, &D.965);
f_a.mv.data = 0B;
}
So it deallocates it.
Normal save allocatable types are done correctly.
Also I don't think this is that embarassing as allocatable in derived
types is a new feature of Fortran.
-- Pinski
More information about the Fortran
mailing list