Message ID | CAKwh3qggYNdZs17PKowGb_wnH2_AdSsFcvyHhpP8kyDpJTHvEQ@mail.gmail.com |
---|---|
State | New |
Headers | show |
Index: gcc/fortran/class.c =================================================================== --- gcc/fortran/class.c (Revision 241992) +++ gcc/fortran/class.c (Arbeitskopie) @@ -224,7 +224,8 @@ gfc_add_component_ref (gfc_expr *e, const char *na break; tail = &((*tail)->next); } - if (derived->components->next->ts.type == BT_DERIVED && + if (derived->components && derived->components->next && + derived->components->next->ts.type == BT_DERIVED && derived->components->next->ts.u.derived == NULL) { /* Fix up missing vtype. */