https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106121
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:8bb7567f5a3e67ab91614d4538eb3a14a5a76274 commit r10-10881-g8bb7567f5a3e67ab91614d4538eb3a14a5a76274 Author: Harald Anlauf <anl...@gmx.de> Date: Tue Jun 28 22:29:28 2022 +0200 Fortran: improve error recovery for EXTENDS_TYPE_OF() [PR106121] gcc/fortran/ChangeLog: PR fortran/106121 * simplify.c (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 <ka...@gcc.gnu.org> (cherry picked from commit b8f284d3673004dffae714b56ed663467c2a52a7)