]> 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>
Tue, 2 Apr 2024 14:53:29 +0000 (15:53 +0100)
commita7aa9455a8b9cb080649a7357b7360f2d99bcbf1
tree692e2820491c0fdf024294faf41e8cf05f4ee165
parent35408b3669fac104cd380582b32e32c64a603d8b
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.
gcc/fortran/interface.cc
gcc/testsuite/gfortran.dg/pr106999.f90 [new file with mode: 0644]