]> git.ipfire.org Git - thirdparty/gcc.git/commit
Do not generate formal arglist from actual if we have already resolved it.
authorThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 11 May 2025 05:40:23 +0000 (07:40 +0200)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Tue, 13 May 2025 19:27:02 +0000 (21:27 +0200)
commita3eed34d75ce8fe13e3cdc28c42849ada26c316f
tree6e2960c35eedc5451051fec9d13a8a532422ccd9
parent61fada934e894c7fb4a1f1626ea0d0f1f1f1d2f4
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.
gcc/fortran/gfortran.h
gcc/fortran/resolve.cc
gcc/testsuite/gfortran.dg/interface_61.f90 [new file with mode: 0644]