2019-02-04 Martin Liska <mliska@suse.cz>
PR fortran/89185
* resolve.c (resolve_ref): Remove breakout variable as
we need to prevent prev = &(*prev)->next to happen
with *prev == NULL.
From-SVN: r268521
+2019-02-04 Martin Liska <mliska@suse.cz>
+
+ PR fortran/89185
+ * resolve.c (resolve_ref): Remove breakout variable as
+ we need to prevent prev = &(*prev)->next to happen
+ with *prev == NULL.
+
2019-02-04 Martin Liska <mliska@suse.cz>
PR fortran/88912
int current_part_dimension, n_components, seen_part_dimension;
gfc_ref *ref, **prev;
bool equal_length;
- bool breakout;
for (ref = expr->ref; ref; ref = ref->next)
if (ref->type == REF_ARRAY && ref->u.ar.as == NULL)
break;
}
- breakout = false;
- for (prev = &expr->ref; !breakout && *prev != NULL; prev = &(*prev)->next)
+ for (prev = &expr->ref; *prev != NULL;
+ prev = *prev == NULL ? prev : &(*prev)->next)
switch ((*prev)->type)
{
case REF_ARRAY:
expr->ts.u.cl = ref->u.ss.length;
ref->u.ss.length = NULL;
gfc_free_ref_list (ref);
- if (*prev == NULL)
- breakout = true;
}
break;
}