https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64290
--- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> --- Created attachment 49952 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49952&action=edit Slightly better patch This gets rid of the regression in gfortran.dg/finalize_29.f08. However, finalize_25.f90 exposes the real scale of the problem because it shows that finalization is partially implemented for variables with allocatable components and this causes collisions with the finalization in the patch. Cheers Paul