]> gcc.gnu.org Git - gcc.git/commitdiff
This patch fixes PR47469 - a trivial bit of tidying up.
authorPaul Thomas <pault@gcc.gnu.org>
Wed, 7 Oct 2020 13:59:10 +0000 (14:59 +0100)
committerPaul Thomas <pault@gcc.gnu.org>
Wed, 7 Oct 2020 13:59:10 +0000 (14:59 +0100)
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.

gcc/fortran/trans-expr.c

index 2c31ec9bf019f9699f0482daeaa9aa7ab0ce3625..2167de455b881be297a95f34a719d7a0912f4738 100644 (file)
@@ -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
This page took 0.065342 seconds and 5 git commands to generate.