From 7c7e841806aecf4187c69fc2ff07813c7be09582 Mon Sep 17 00:00:00 2001 From: Paul Thomas Date: Wed, 7 Oct 2020 14:59:10 +0100 Subject: [PATCH] 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. --- gcc/fortran/trans-expr.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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 -- 2.30.2