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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Thomas Koenig
<tkoe...@gcc.gnu.org>:

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

commit r15-9678-ga3eed34d75ce8fe13e3cdc28c42849ada26c316f
Author: Thomas Koenig <tkoe...@gcc.gnu.org>
Date:   Sun May 11 07:40:23 2025 +0200

    Do not generate formal arglist from actual if we have already resolved it.

    This bug was another case of generating a formal arglist from
    an actual one where we should not have done so.  The fix is
    straightforward:  If we have resolved the formal arglist, we should
    not generare a new one.

    OK for trunk and backport?

    gcc/fortran/ChangeLog:

            PR fortran/120163
            * gfortran.h: Add formal_resolved to gfc_symbol.
            * resolve.cc (gfc_resolve_formal_arglist): Set it.
            (resolve_function): Do not call gfc_get_formal_from_actual_arglist
            if we already resolved a formal arglist.
            (resolve_call): Likewise.

    gcc/testsuite/ChangeLog:

            PR fortran/120163
            * gfortran.dg/interface_61.f90: New test.

Reply via email to