https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105012
--- Comment #33 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Mikael Morin <mik...@gcc.gnu.org>: https://gcc.gnu.org/g:20aa1eb6cb84e6a0487b47b28b00109c5f46a7e2 commit r13-2836-g20aa1eb6cb84e6a0487b47b28b00109c5f46a7e2 Author: Harald Anlauf <anl...@gmx.de> Date: Wed Aug 31 11:50:35 2022 +0200 fortran: Support clobbering with implicit interfaces [PR105012] Before procedure calls, we clobber actual arguments whose associated dummy is INTENT(OUT). This only applies to procedures with explicit interfaces, as the knowledge of the interface is necessary to know whether an argument has the INTENT(OUT) attribute. This change also enables clobber generation for procedure calls without explicit interface, when the procedure has been defined in the same file because we can use the dummy arguments' characteristics from the procedure definition in that case. The knowledge of the dummy characteristics is directly available through gfc_actual_arglistâs associated_dummy pointers which have been populated as a side effect of calling gfc_check_externals. PR fortran/105012 gcc/fortran/ChangeLog: * trans-expr.cc (gfc_conv_procedure_call): Use dummy information from associated_dummy if there is no information from the procedure interface. gcc/testsuite/ChangeLog: * gfortran.dg/intent_optimize_5.f90: New test. Co-Authored-By: Mikael Morin <mik...@gcc.gnu.org>