Fortran: improve error recovery for EXTENDS_TYPE_OF() [PR106121]
authorHarald Anlauf <anlauf@gmx.de>
Tue, 28 Jun 2022 20:29:28 +0000 (22:29 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Sun, 3 Jul 2022 19:38:05 +0000 (21:38 +0200)
commitcf12a703cf7af34d91a6346883600caac2156e6e
tree7f02312523cdefa092e93d45526b4eae3f2fcf85
parent55899e33de74082521708a58fdc79510e0c5efad
Fortran: improve error recovery for EXTENDS_TYPE_OF() [PR106121]

gcc/fortran/ChangeLog:

PR fortran/106121
* simplify.cc (gfc_simplify_extends_type_of): Do not attempt to
simplify when one of the arguments is a CLASS variable that was
not properly declared.

gcc/testsuite/ChangeLog:

PR fortran/106121
* gfortran.dg/extends_type_of_4.f90: New test.

Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
(cherry picked from commit b8f284d3673004dffae714b56ed663467c2a52a7)
gcc/fortran/simplify.cc
gcc/testsuite/gfortran.dg/extends_type_of_4.f90 [new file with mode: 0644]