]> git.ipfire.org Git - thirdparty/gcc.git/commit
Type mismatch for passed external function
authorThomas Koenig <tkoenig@gcc.gnu.org>
Fri, 30 May 2025 11:31:58 +0000 (13:31 +0200)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Fri, 30 May 2025 11:36:32 +0000 (13:36 +0200)
commit0e77309047a7b479c89f03dcaf2994e050d0f33e
treee5cd0f0cc81c642a04d1cd63f6c89d41d5a2419d
parent333628a1e2964193c6d93da6332c52ba9e1640b5
Type mismatch for passed external function

This obvious and simple patch fixes a 15/16 regression where the
typespec of a global function was in the RESULT clause and not
in the symbol itself.

gcc/fortran/ChangeLog:

PR fortran/120355
* interface.cc (compare_parameter): If the global function has a
result clause, take typespec from there for the comparison against
the dummy argument.

gcc/testsuite/ChangeLog:

PR fortran/120355
* gfortran.dg/interface_62.f90: New test.
gcc/fortran/interface.cc
gcc/testsuite/gfortran.dg/interface_62.f90 [new file with mode: 0644]