[Bug fortran/80524] [F03] Problematic behaviour with a finalization subroutine in gfortran

jvdelisle at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 1 18:45:00 GMT 2017


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

--- Comment #5 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
(In reply to janus from comment #4)
> (In reply to Jerry DeLisle from comment #3)
> > I think this depends a lot on the compiler implementation.
> 
> I don't actually think the calling of finalization routines is supposed to
> depend on the compiler implementation. F08 is rather clear on where it
> should happen, I guess.
> 
> For the missing cases, see also:
> * PR 64290 (No finalization at deallocation of LHS)
> * PR 65347 (Final subroutine not called for function result)
> 
> and PR 37336 comment 27 which includes both of them.

My only thought here is that those conditions may be A or B or C vs A and B and
C

If the finalization is to for example deallocate something, would we end up
trying to deallocate more than once? It seems to me that it depends on how many
actual instances of the object were created.


More information about the Gcc-bugs mailing list