2020-07-10 Paul Thomas <pault@gcc.gnu.org>
gcc/fortran
PR fortran/47469
* trans-expr.c (arrayfunc_assign_needs_temporary): Tidy detection
of pointer and allocatable functions.
return true;
/* Functions returning pointers or allocatables need temporaries. */
- c = expr2->value.function.esym
- ? (expr2->value.function.esym->attr.pointer
- || expr2->value.function.esym->attr.allocatable)
- : (expr2->symtree->n.sym->attr.pointer
- || expr2->symtree->n.sym->attr.allocatable);
- if (c)
+ if (gfc_expr_attr (expr2).pointer
+ || gfc_expr_attr (expr2).allocatable)
return true;
/* Character array functions need temporaries unless the