Fortran: improve checking of FINAL subroutine arguments [PR104572]
authorHarald Anlauf <anlauf@gmx.de>
Wed, 22 Mar 2023 18:20:41 +0000 (19:20 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Wed, 22 Mar 2023 18:20:41 +0000 (19:20 +0100)
commit3e791f45ded89626bc1f9f8013728f6e035801b2
tree8043092897ba8bab6da376996e5f3f640413b426
parentf2e70da638b4f6ba868ff07ab2123cad4fd9fd02
Fortran: improve checking of FINAL subroutine arguments [PR104572]

gcc/fortran/ChangeLog:

PR fortran/104572
* resolve.cc (gfc_resolve_finalizers): Argument of a FINAL subroutine
cannot be an alternate return.

gcc/testsuite/ChangeLog:

PR fortran/104572
* gfortran.dg/pr104572.f90: New test.

Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
gcc/fortran/resolve.cc
gcc/testsuite/gfortran.dg/pr104572.f90 [new file with mode: 0644]