https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120140
--- Comment #30 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Paul Thomas <[email protected]>: https://gcc.gnu.org/g:35438301f32bdf162e0b56be1facc2fcb65e9593 commit r16-8702-g35438301f32bdf162e0b56be1facc2fcb65e9593 Author: Paul Thomas <[email protected]> Date: Thu Apr 16 14:09:49 2026 +0100 Fortran: Fix dependencies in elemental subroutine calls [PR120140] 2026-04-16 Paul Thomas <[email protected]> gcc/fortran PR fortran/120140 * resolve.cc (resolve_elemental_dependencies): New function, preceded by prototype for add_temp_assign_before_call. (resolve_call): If an elemental subroutine call has at least two actual erguments, call resolve_elemental_dependencies to generate temporary expressions for the arguments if required. (get_temp_from_expr): Add optional boolean argument, which if set, makes the resulting temporary unconditionally allocatable. (add_temp_assign_before_call): New function. gcc/testsuite/ PR fortran/123352 * gfortran.dg/defined_assignment_13.f90: Add previously failing tests.
