]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR fortran/96381 - invalid read in gfc_find_derived_vtab
authorHarald Anlauf <anlauf@gmx.de>
Fri, 1 Jan 2021 17:55:41 +0000 (18:55 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Mon, 4 Jan 2021 20:56:15 +0000 (21:56 +0100)
commit78ff090d0a0bb5a77560203b3b49bb7da7fcb88c
tree5ac5d9a435948f59cbe4387dcb0fce12c78fc461
parent6f3f06e431c181d3e51d31f49a2bf0be2944ae93
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)
gcc/fortran/class.c