https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107489
Paul Thomas <pault at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 CC| |pault at gcc dot gnu.org Status|UNCONFIRMED |NEW Last reconfirmed| |2022-11-08 Summary|Runtime segfault in |Insufficiently deep |finalization routine of |allocate/copy for simple |derived type with |assignment of derived types |allocatable components |with recursive components --- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> --- (In reply to kargl from comment #1) > Federic, there was a small burst of work on finalization here > > https://gcc.gnu.org/pipermail/fortran/2022-February/thread.html > > I thought a patch was floating around in the fortran@gcc mailing list, but > could not find it. You might ping the participants in the above thread if > anyone has made any progress. Please do not mix things up. There are no finalizable entities in the testcase, since there are no final subroutines. The "default finalization" that triggers this problem is the automatic deallocation of allocatable entities on going out of scope. For some reason, it is the assignment c2 = c1 that is the culprit. Evidently, the allocation and assignment of the components is not going deep enough. I have changed the title of the PR accordingly. I have been triggered to complete the finalization work that I left off in March but daytime work prevents me from picking anything else up for the time being. Thanks for the report Paul