From: Paul Thomas Date: Wed, 7 Oct 2020 13:59:10 +0000 (+0100) Subject: This patch fixes PR47469 - a trivial bit of tidying up. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7c7e841806aecf4187c69fc2ff07813c7be09582;p=gcc.git This patch fixes PR47469 - a trivial bit of tidying up. 2020-07-10 Paul Thomas gcc/fortran PR fortran/47469 * trans-expr.c (arrayfunc_assign_needs_temporary): Tidy detection of pointer and allocatable functions. --- diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 2c31ec9bf01..2167de455b8 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -9810,12 +9810,8 @@ arrayfunc_assign_needs_temporary (gfc_expr * expr1, gfc_expr * expr2) 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