https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123772
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jerry DeLisle <[email protected]>: https://gcc.gnu.org/g:3c4ca61fa09ee25d0bba4ec1124a82573d91df47 commit r16-7017-g3c4ca61fa09ee25d0bba4ec1124a82573d91df47 Author: Jerry DeLisle <[email protected]> Date: Fri Jan 23 18:52:34 2026 -0800 Fortran: Fix missed finalization PR fortran/123772 gcc/fortran/ChangeLog: * trans.cc: Add global variable is_assign_call. (gfc_finalize_tree_expr): Derived type function results with components that have defined assignements are handled in resolve.cc(generate_component_assignments), unless the assignment was replaced by a subroutine call to the subroutine associated with the assignment operator. (trans_code): In the case of EXEC_ASSIGN_CALL, set the is_asign_call before calling gfc_trans_call, then clear it after. gcc/testsuite/ChangeLog: * gfortran.dg/pr123772.f03: New test. Signed off by: Andrew Benson <[email protected]>
