https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122206
--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Harald Anlauf <[email protected]>: https://gcc.gnu.org/g:2f881d81d613a52b57dab311f0eacc5da11bae7e commit r15-10450-g2f881d81d613a52b57dab311f0eacc5da11bae7e Author: Harald Anlauf <[email protected]> Date: Thu Oct 9 18:43:22 2025 +0200 Fortran: fix "unstable" interfaces of external procedures [PR122206] In the testcase repeated invocations of a function showed an apparently unstable interface. This was caused by trying to guess an (inappropriate) interface of the external procedure after processing of the procedure arguments in gfc_conv_procedure_call. The mis-guessed interface showed up in subsequent uses of the procedure symbol in gfc_conv_procedure_call. The solution is to check for an existing interface of an external procedure before trying to wildly guess based on just the actual arguments. PR fortran/122206 gcc/fortran/ChangeLog: * trans-types.cc (gfc_get_function_type): Do not clobber an existing procedure interface. gcc/testsuite/ChangeLog: * gfortran.dg/interface_abstract_6.f90: New test. (cherry picked from commit c474a50b42ac3f7561f628916cf58810044986b3)
