]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Add error for subroutine passed to a variable dummy [PR106999]
authorPaul Thomas <pault@gcc.gnu.org>
Tue, 2 Apr 2024 14:53:29 +0000 (15:53 +0100)
committerPaul Thomas <pault@gcc.gnu.org>
Mon, 6 May 2024 10:01:04 +0000 (11:01 +0100)
commitd72e9f90e370538b057690b16c1e65350dbbb75c
tree02d9a85f807746d18f2226806f40cd2707e7c590
parent3a5acd2583056e8cd0e5fda83e7c34be65415c62
Fortran: Add error for subroutine passed to a variable dummy [PR106999]

2024-04-02  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/106999
* interface.cc (gfc_compare_interfaces): Add error for a
subroutine proc pointer passed to a variable formal.
(compare_parameter): If a procedure pointer is being passed to
a non-procedure formal arg, and there is an an interface, use
gfc_compare_interfaces to check and provide a more useful error
message.

gcc/testsuite/
PR fortran/106999
* gfortran.dg/pr106999.f90: New test.

(cherry picked from commit a7aa9455a8b9cb080649a7357b7360f2d99bcbf1)
gcc/fortran/interface.cc
gcc/testsuite/gfortran.dg/pr106999.f90 [new file with mode: 0644]