]> 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 09:57:34 +0000 (10:57 +0100)
commit429935510202c4efee933bf907fd9dff816193f2
tree5444a0d4bdac869a73c3bb92a2901b9d068144f8
parentf598a1c8a77e678ca009b433fd849b4834594926
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]