https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119669
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Thomas Koenig <tkoe...@gcc.gnu.org>: https://gcc.gnu.org/g:64319b2ccae2fdfae06347545e031e56d790dad7 commit r15-9406-g64319b2ccae2fdfae06347545e031e56d790dad7 Author: Thomas Koenig <tkoe...@gcc.gnu.org> Date: Sun Apr 13 10:22:07 2025 +0200 Fix ICE in compare_parameter. This patch fixes an ICE by setting the typespec of a dummy argument from a global function if known. plus setting the correct flag. This also removes the corresponding assert. I'm not quite sure that the code with the subroutine attribute can be reached, but I thought better safe than sorry. gcc/fortran/ChangeLog: PR fortran/119669 * interface.cc (compare_parameter): Error when mismatch between formal argument as subroutine and function. If the dummy argument is a known function, set its typespec. gcc/testsuite/ChangeLog: PR fortran/119669 * gfortran.dg/interface_59.f90: New test.