http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46174
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |domob at gcc dot gnu.org
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-10-26
13:27:11 UTC ---
Possible implementation scheme: vtab$t contains besides the normal type-bound
procedures and init/size/hash also an two function points: $copy and $free,
which are of the kind:
void $free (struct *DT) {
... free derived types
if (DT->$vtab->$extends && DT->$vtab->$extends->$free)
DT->$vtab->$extends->$free (DT)
}
That is, each effective type cleans up its own allocatable components and moves
on to the parent. If the parent does not have an allocatable component itself,
the $free pointer directly points to an ancestor which has -- or is NULL if no
such ancestor exists. The $copy version works alike.