https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96986

--- Comment #18 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Paul Thomas <[email protected]>:

https://gcc.gnu.org/g:a007f2db438f3dd0a74bdce2b095592d196fa138

commit r15-11165-ga007f2db438f3dd0a74bdce2b095592d196fa138
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)

Reply via email to