]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: do not evaluate polymorphic functions twice in assignment [PR114012]
authorHarald Anlauf <anlauf@gmx.de>
Sun, 25 Feb 2024 20:18:23 +0000 (21:18 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Mon, 26 Feb 2024 17:49:09 +0000 (18:49 +0100)
commit2f71e801ad0bb1f620334aadbd7c99cc4efe6309
treeafd51aeab783183ed67dbfdfdb8b7cd6078f2745
parent1931c40364bb9fb0a7c4b650917e3ac0e88bf6f4
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.
gcc/fortran/trans-expr.cc
gcc/testsuite/gfortran.dg/pr114012.f90 [new file with mode: 0644]