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

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

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

commit r13-10310-ga4e1bbb3731f00ec5edeae9e96a4c5e69ceb6f75
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