https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114012
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:1f5787e4b803a4294eeb80e048f56ccdb99c1b3b commit r13-8407-g1f5787e4b803a4294eeb80e048f56ccdb99c1b3b Author: Harald Anlauf <anl...@gmx.de> Date: Sun Feb 25 21:18:23 2024 +0100 Fortran: do not evaluate polymorphic functions twice in assignment [PR114012] PR fortran/114012 gcc/fortran/ChangeLog: * trans-expr.cc (gfc_conv_procedure_call): Evaluate non-trivial arguments just once before assigning to an unlimited polymorphic dummy variable. gcc/testsuite/ChangeLog: * gfortran.dg/pr114012.f90: New test. (cherry picked from commit 2f71e801ad0bb1f620334aadbd7c99cc4efe6309)