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

Christopher Albert <albert at tugraz dot at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |albert at tugraz dot at

--- Comment #10 from Christopher Albert <albert at tugraz dot at> ---
Open for review, comments welcome:
https://github.com/lazy-fortran/gcc/pull/41

Root cause: a CALL statement marks an unresolved procedure as a
subroutine before its procedure kind is known, and was_declared in
resolve.cc treated that provisional attribute as a declaration, so
resolution never reached the optional dummy procedure in the host
scope and emitted an undefined local symbol instead. The fix makes
was_declared require a known procedure kind before the subroutine
attribute counts as a declaration (one condition). A run test is
included; check-fortran and the libgomp Fortran suite are clean.

Reply via email to