This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch,Fortran] PRs 45451 / 43018: Fixes for allocatables
Hi Janus,
On 10/26/2010 08:37 AM, Janus Weil wrote:
I think the patch is ok. Thanks for taking care of this.
Thanks for the review. (Committed as Rev. 165936.)
PS: This patch does not fix all problems with PR 45451.
You mean comment #8/9?
Actually, I rather mean the issues I mentioned in comment 16. I am not
sure whether comment 8 is a new bug of the consequence of a missing deep
copy. And regarding comment 9: I am too lazy to debug an invalid program
- at least until the known problems are fixed.
Frankly, I have no idea how to best solve the deep-copying problem for
polymorphic types. One could think of creating hidden COPY and FREE
type-bound procedures, which free the added allocatables of the type and
then call the parent free function. That is:
if (a$vtab->free)
free(a)
as deallocation function -- and in the deallocation function:
if (a$vtab->parent->free)
free(a)
if a type extension does not have a allocatable components, it simply
directly points to the parent.
Tobias