https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114012
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:2f71e801ad0bb1f620334aadbd7c99cc4efe6309 commit r14-9186-g2f71e801ad0bb1f620334aadbd7c99cc4efe6309 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.