https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102331
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Jerry DeLisle <jvdeli...@gcc.gnu.org>: https://gcc.gnu.org/g:82ec75a726b3f8f874dacb0cb342c9bbd1233cc0 commit r12-9320-g82ec75a726b3f8f874dacb0cb342c9bbd1233cc0 Author: Jerry DeLisle <jvdeli...@gcc.gnu.org> Date: Sun Mar 26 18:44:35 2023 -0700 Fortran: Modify checks to avoid referencing NULL pointer. Backport from mainline. gcc/fortran/ChangeLog: PR fortran/102331 * decl.cc (attr_decl1): Guard against NULL pointer. * parse.cc (match_deferred_characteristics): Include BT_CLASS in check for derived being undefined. gcc/testsuite/ChangeLog: PR fortran/102331 * gfortran.dg/class_result_4.f90: Update error message check. * gfortran.dg/pr85779_3.f90: Update error message check.