https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96986
--- Comment #19 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Paul Thomas <[email protected]>: https://gcc.gnu.org/g:8ee8fed4c21130fa832b7e2ebd4122244251a755 commit r14-12587-g8ee8fed4c21130fa832b7e2ebd4122244251a755 Author: Christopher Albert <[email protected]> Date: Sun Mar 29 21:52:37 2026 +0200 fortran: Fix false explicit-interface-required for ENTRY with volatile [PR96986] When resolving a call to an ENTRY procedure, the entry lookup that replaces the master procedure's def_sym with the specific entry symbol was inside the 'resolved != -1' block. During recursive resolution the namespace is marked resolved == -1, so the lookup was skipped and the explicit interface check used the master procedure's combined formal argument list instead of the entry's own formals. Move the entry lookup after the resolution block so it runs regardless of the namespace resolution state. PR fortran/96986 gcc/fortran/ChangeLog: * resolve.cc (resolve_global_procedure): Move entry symbol lookup outside the resolved != -1 block. gcc/testsuite/ChangeLog: * gfortran.dg/pr96986.f90: New test. Signed-off-by: Christopher Albert <[email protected]> (cherry picked from commit 6be9db000810a44c5b6b5af320723b3af175bb8a)
