https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95710
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:767eea9ea22f0247be9a56fd2e1d460ddfbbf6d9 commit r14-4238-g767eea9ea22f0247be9a56fd2e1d460ddfbbf6d9 Author: Harald Anlauf <anl...@gmx.de> Date: Fri Sep 22 21:06:00 2023 +0200 fortran: error recovery on duplicate declaration of class variable [PR95710] gcc/fortran/ChangeLog: PR fortran/95710 * class.cc (gfc_build_class_symbol): Do not try to build class container for invalid typespec. * resolve.cc (resolve_fl_var_and_proc): Prevent NULL pointer dereference. (resolve_symbol): Likewise. gcc/testsuite/ChangeLog: PR fortran/95710 * gfortran.dg/pr95710.f90: New test.