Thomas,
Even though Paul OK the patch, I have a question below.
On Fri, Nov 17, 2017 at 06:38:20PM +0100, Thomas Koenig wrote:
> + {
> + if (expr->value.function.esym)
> + return expr->value.function.esym->result->attr.contiguous;
> + else
> + {
> + /* We have to jump through some hoops if this is a vtab entry. */
> + gfc_symbol *s;
> + gfc_ref *r, *rc;
> +
> + s = expr->symtree->n.sym;
> + if (s->ts.type != BT_CLASS)
> + return false;
> +
> + rc = NULL;
> + for (r = expr->ref; r; r = r->next)
> + if (r->type == REF_COMPONENT)
> + rc = r;
Should you have a break here? As I understand it, you're walking a
list, so you could have r, r->next, r->next->next, and so on. Is
it possible to have r->next->type = REF_COMPONENT and
r->next->next->type = REF_COMPONENT, where you end up with the wrong
one?
--
Steve