https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80477
janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=65347 --- Comment #19 from janus at gcc dot gnu.org --- I think this PR is very much related to PR 65347 ("Final subroutine not called for function result") ... Deallocation and finalization of function results are very similar. Both require a temporary to be generated. And IIRC we even use the finalization wrapper for deallocating polymorphic variables in other cases (even if they have no actual FINAL procedures). Such an approach would fix both PRs in one go.