]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix LAPACK build error due to global symbol checking.
authorThomas Koenig <tkoenig@gcc.gnu.org>
Thu, 13 Feb 2025 20:47:39 +0000 (21:47 +0100)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Thu, 13 Feb 2025 20:52:58 +0000 (21:52 +0100)
commitcdb4d27a4c2786cf1b1b0eb1872eac6a5f931578
treede14f03692d70624fc1f47f0b0e0b32fcff4b795
parent6f7935b3fd60968cff1b3252edf40022f25705aa
Fix LAPACK build error due to global symbol checking.

This was an interesting regression.  It came from my recent
patch, where an assert was triggered because a procedure artificial
dummy argument generated for a global symbol did not have the
information if if was a function or a subroutine.  Fixed by
adding the information in gfc_get_formal_from_actual_arglist.

This information then uncovered some new errors, also in the
testsuite, which needed fixing.  Finally, the error is made to
look a bit nicer, so the user gets a pointer to where the
original interface comes from.

gcc/fortran/ChangeLog:

PR fortran/118845
* interface.cc (compare_parameter): If the formal attribute has been
generated from an actual argument list, also output an pointer to
there in case of an error.
(gfc_get_formal_from_actual_arglist): Set function and subroutine
attributes and (if it is a function) the typespec from the actual
argument.

gcc/testsuite/ChangeLog:

PR fortran/118845
* gfortran.dg/recursive_check_4.f03: Adjust call so types matche.
* gfortran.dg/recursive_check_6.f03: Likewise.
* gfortran.dg/specifics_2.f90: Adjust calls so types match.
* gfortran.dg/interface_52.f90: New test.
* gfortran.dg/interface_53.f90: New test.
gcc/fortran/interface.cc
gcc/testsuite/gfortran.dg/interface_52.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/interface_53.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/recursive_check_4.f03
gcc/testsuite/gfortran.dg/recursive_check_6.f03
gcc/testsuite/gfortran.dg/specifics_2.f90