mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-28 20:46:08 +08:00
PR fortran/78746 - invalid access after error recovery
The error recovery after an invalid reference to an undefined CLASS during a TYPE declaration lead to an invalid access. Add a check. gcc/fortran/ChangeLog: * resolve.c (resolve_component): Add check for valid CLASS reference before trying to access CLASS data.
This commit is contained in:
parent
e6a5daae7e
commit
8b6f1e8f97
@ -14384,7 +14384,7 @@ resolve_component (gfc_component *c, gfc_symbol *sym)
|
||||
/* F2008, C448. */
|
||||
if (c->ts.type == BT_CLASS)
|
||||
{
|
||||
if (CLASS_DATA (c))
|
||||
if (c->attr.class_ok && CLASS_DATA (c))
|
||||
{
|
||||
attr = &(CLASS_DATA (c)->attr);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user