https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120099
--- Comment #22 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:bf98b735ae01c652f641b824a7c4e1d575b5b6d8 commit r16-734-gbf98b735ae01c652f641b824a7c4e1d575b5b6d8 Author: Harald Anlauf <anl...@gmx.de> Date: Sun May 18 22:42:26 2025 +0200 Fortran: fix FAIL of gfortran.dg/specifics_1.f90 after r16-372 [PR120099] After commit r16-372, testcase gfortran.dg/specifics_1.f90 started to FAIL at -O2 and higher, as DCE lead to elimination of evaluations of Fortran specific intrinsics returning complex results and with -ff2c. As the Fortran runtime library is compiled with -fno-f2c, the frontend generates calls to wrapper subroutines _gfortran_f2c_specific_* that return their result by reference via their first argument when this is needed. This is e.g. the case when specific names of the intrinsics are used for passing as actual argument to procedures. These wrappers are not pure in the GCC IR sense, even if the Fortran intrinsics are. Therefore gfc_return_by_reference must return true for these. PR fortran/120099 gcc/fortran/ChangeLog: * trans-types.cc (gfc_return_by_reference): Intrinsic functions returning complex numbers may return their result by reference with -ff2c.