https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107914
Bug ID: 107914 Summary: Finalization errors Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: pault at gcc dot gnu.org CC: damian at archaeologic dot codes Blocks: 37336 Target Milestone: --- Created attachment 53981 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53981&action=edit Failing testcase The attachment was provided by Damian Rouson. The output with GNU Fortran (GCC) 13.0.0 20221128 (experimental) is: [pault@pc30 prs]$ gfortran ~/prs/compile_me_only.f90 -g -fdump-tree-original;./a.out Fail: finalizes a non-allocatable object on the LHS of an intrinsic assignment Fail: finalizes an allocated allocatable LHS of an intrinsic assignment Pass: finalizes a target when the associated pointer is deallocated Pass: finalizes an object upon explicit deallocation Pass: finalizes a non-pointer non-allocatable object at the END statement Pass: finalizes a non-pointer non-allocatable object at the end of a block construct Fail: finalizes a function reference on the RHS of an intrinsic assignment Fail: finalizes a specification expression function result Pass: finalizes an intent(out) derived type dummy argument Pass: finalizes an allocatable component object A subsidiary program specification_expression_finalization.f90, which will be attached next, is compiled and tested by compile_me_only.f90 It is entirely fixed by the revived version of my finalization patch, which will be hitting the list soon. Paul Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336 [Bug 37336] [F03] Finish derived-type finalization