Message ID | trinity-e901471d-de9f-474f-9ea3-1fd57856acb6-1609879289302@3c-app-gmx-bap22 |
---|---|
State | New |
Headers | show |
Series | PR fortran/78746 - invalid access after error recovery | expand |
Hi Harald,
> OK for master? Open branches where testcase class_61.f90 exists?
OK for both (as you wrote, this one is really obvious).
Best regards
Thomas
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index fa6f756d285..891db391907 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -14384,7 +14396,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);