https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96381
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:2bfcf6011a6cdce0439e3d1b94bcb5fcf078f4c2 commit r9-9151-g2bfcf6011a6cdce0439e3d1b94bcb5fcf078f4c2 Author: Harald Anlauf <anl...@gmx.de> Date: Fri Jan 1 18:55:41 2021 +0100 PR fortran/96381 - invalid read in gfc_find_derived_vtab An invalid declaration of a CLASS instance can lead to an internal state with inconsistent attributes during parsing that needs to be handled with sufficient care when processing subsequent statements. Avoid a lookup of the vtab entry for such cases. gcc/fortran/ChangeLog: * class.c (gfc_find_vtab): Add check on attribute is_class. (cherry picked from commit d816b0c144d15e6570eb5b124b9f3ccbe3d40082)