public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/47469] New: Check whether arrayfunc_assign_needs_temporary misses TBP/PPC attributes
@ 2011-01-26  9:58 burnus at gcc dot gnu.org
  2015-10-13 13:45 ` [Bug fortran/47469] " dominiq at lps dot ens.fr
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-01-26  9:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47469

           Summary: Check whether arrayfunc_assign_needs_temporary misses
                    TBP/PPC attributes
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
                CC: pault@gcc.gnu.org, janus@gcc.gnu.org


Found when looking at PR 47455 and trans-expr.c:

I wonder whether for type-bound procedures or for procedure-pointer components,
the "pointer" or "allocatable" attribute is properly taken into account in
arrayfunc_assign_needs_temporary.

However, I have not checked whether this is an really and issue or whether
there are other related issues.

Thus, something like:

--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -5346,8 +5381,8 @@ arrayfunc_assign_needs_temporary (gfc_expr * expr1,
gfc_expr * expr2)
     return true;

   /* Functions returning pointers need temporaries.  */
-  if (expr2->symtree->n.sym->attr.pointer
-      || expr2->symtree->n.sym->attr.allocatable)
+  if (gfc_expr_attr (expr2).pointer
+      || gfc_expr_attr (expr2).allocatable)
     return true;

   /* Character array functions need temporaries unless the


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-10-07 14:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-26  9:58 [Bug fortran/47469] New: Check whether arrayfunc_assign_needs_temporary misses TBP/PPC attributes burnus at gcc dot gnu.org
2015-10-13 13:45 ` [Bug fortran/47469] " dominiq at lps dot ens.fr
2015-10-14 11:57 ` pault at gcc dot gnu.org
2015-10-14 16:03 ` dominiq at lps dot ens.fr
2015-10-14 21:43 ` dominiq at lps dot ens.fr
2015-10-15  9:14 ` pault at gcc dot gnu.org
2020-10-05 13:25 ` dominiq at lps dot ens.fr
2020-10-06  6:03 ` pault at gcc dot gnu.org
2020-10-07 13:59 ` cvs-commit at gcc dot gnu.org
2020-10-07 14:02 ` pault at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).