[Bug fortran/96986] [13/14/15/16 Regression] Explicit interface required: volatile argument for ENTRY subroutine

albert at tugraz dot at gcc-bugzilla@gcc.gnu.org
Sun Mar 29 19:53:15 GMT 2026


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

--- Comment #15 from Christopher Albert <albert at tugraz dot at> ---
Created attachment 64073
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64073&action=edit
[PATCH] fortran: Fix false explicit-interface-required for ENTRY with volatile
[PR96986]

Patch attached.

The entry symbol lookup in resolve_global_procedure that replaces the
master procedure def_sym with the specific entry symbol was inside the
resolved != -1 block.  During recursive namespace resolution, the lookup
was skipped and the explicit interface check used the master procedure's
combined formals instead of the entry's own (empty) formals.

The fix moves the entry lookup after the resolution block so it runs
regardless of the namespace resolution state.

Regtested on x86_64-pc-linux-gnu with full check-gfortran: 0 FAIL / XPASS.


More information about the Gcc-bugs mailing list