[Bug fortran/96122] Segfault when using finalizer

tkoenig at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Jul 11 17:36:10 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96122

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |37336

--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Andrew Benson from comment #2)
> (In reply to Dominique d'Humieres from comment #1)
> > Confirmed. For me it segfaults from GCC7 up to GCC11.
> 
> Interesting. This started occurring for me when I updated from GCC10.1 to
> 11. But, the code I posted is a reduced test case that I created - so maybe
> the original (non-reduced-test-case) code wasn't triggering this previously
> for some reason.

In Gcc 10.1, we did not call the finalizer for all required instances
(PR 94109).  This has been fixed for gcc11 and the upcoming 10.2 release.

It is likely that calling a (required?) finalizer again has led to
the segfault reappearing.

(Our finalizer handling is a mess, this and PDTs are really the
only two really buggy fields for F2003 conformance).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
[Bug 37336] [F03] Finish derived-type finalization


More information about the Gcc-bugs mailing list