https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125383
--- Comment #12 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:1f5c34702948eb7591fa3076be3745bd0e0ddf9c commit r17-3149-g1f5c34702948eb7591fa3076be3745bd0e0ddf9c Author: Christopher Albert <[email protected]> Date: Thu Jul 30 05:06:45 2026 +0200 fortran: Preserve host association for dummy procedures [PR125383] A call statement marks an unresolved procedure as a subroutine before its procedure kind is known. was_declared treated that provisional attribute as a declaration, so resolution did not find an optional dummy procedure in the host scope. Require a known procedure kind before the subroutine attribute counts as a declaration. Fixes #24 Assisted-by: GPT-5.6-sol (OpenAI) PR fortran/125383 gcc/fortran/ChangeLog: * resolve.cc (was_declared): Require a known procedure kind for subroutine declarations. gcc/testsuite/ChangeLog: * gfortran.dg/pr125383.f90: New test. Signed-off-by: Christopher Albert <[email protected]>
