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
* [Bug fortran/47469] Check whether arrayfunc_assign_needs_temporary misses TBP/PPC attributes
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 ` dominiq at lps dot ens.fr
2015-10-14 11:57 ` pault at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-13 13:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47469
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2015-10-13
Ever confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
On trunk (6.0 r228753) this has been changed to
/* 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)
return true;
Any point to keep this PR opened?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/47469] Check whether arrayfunc_assign_needs_temporary misses TBP/PPC attributes
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
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu.org @ 2015-10-14 11:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47469
--- Comment #2 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #1)
> On trunk (6.0 r228753) this has been changed to
>
> /* 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)
> return true;
>
> Any point to keep this PR opened?
Tobias' version is prettier! Does it apply without regressions?
Cheers
Paul
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/47469] Check whether arrayfunc_assign_needs_temporary misses TBP/PPC attributes
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
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-14 16:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47469
--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Tobias' version is prettier! Does it apply without regressions?
Obviously the patch in comment 0 no longer applies.
Now finding 'gfc_expr_attr (expr2).pointer' prettier than
'expr2->symtree->n.sym->attr.pointer' is just a matter of taste (29 characters
compared to 35). For a newbie like the later is easier to understand than the
former.
BTW what should it be for 'value.function.esym'?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/47469] Check whether arrayfunc_assign_needs_temporary misses TBP/PPC attributes
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
` (2 preceding siblings ...)
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
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-14 21:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47469
--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Well, this PR has been rotting for more than four years and a half. I was only
pointing to the fact that the initial patch no longer applies.
If you know what to do, please do so. If not, I don't see the point to keep it
open for the next decade.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/47469] Check whether arrayfunc_assign_needs_temporary misses TBP/PPC attributes
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
` (3 preceding siblings ...)
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
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu.org @ 2015-10-15 9:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47469
--- Comment #6 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #5)
> Well, this PR has been rotting for more than four years and a half. I was
> only pointing to the fact that the initial patch no longer applies.
>
> If you know what to do, please do so. If not, I don't see the point to keep
> it open for the next decade.
I'll take a look over the weekend.
Thanks for your efforts to weed out some of the PRs that have passed their
sell-by date. It's much appreciated.
Paul
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/47469] Check whether arrayfunc_assign_needs_temporary misses TBP/PPC attributes
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
` (4 preceding siblings ...)
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
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2020-10-05 13:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47469
--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
No feedback after four more years!-(
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/47469] Check whether arrayfunc_assign_needs_temporary misses TBP/PPC attributes
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
` (5 preceding siblings ...)
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
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu.org @ 2020-10-06 6:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47469
--- Comment #9 from Paul Thomas <pault at gcc dot gnu.org> ---
Tobias's original suggestion is certainly more concise, although equivalent to
the present code.
I will commit the change today or tomorrow as obvious. It happens that I am
working on trans-expr.c at the moment and so will have to reset my tree to deal
with this.
Regards
Paul
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/47469] Check whether arrayfunc_assign_needs_temporary misses TBP/PPC attributes
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
` (6 preceding siblings ...)
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
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-07 13:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47469
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Paul Thomas <pault@gcc.gnu.org>:
https://gcc.gnu.org/g:7c7e841806aecf4187c69fc2ff07813c7be09582
commit r11-3702-g7c7e841806aecf4187c69fc2ff07813c7be09582
Author: Paul Thomas <pault@gcc.gnu.org>
Date: Wed Oct 7 14:59:10 2020 +0100
This patch fixes PR47469 - a trivial bit of tidying up.
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/47469] Check whether arrayfunc_assign_needs_temporary misses TBP/PPC attributes
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
` (7 preceding siblings ...)
2020-10-07 13:59 ` cvs-commit at gcc dot gnu.org
@ 2020-10-07 14:02 ` pault at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu.org @ 2020-10-07 14:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47469
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|WAITING |RESOLVED
--- Comment #11 from Paul Thomas <pault at gcc dot gnu.org> ---
Fixed after a mere 3542 days.
Thanks for the report :-)
Paul
^ 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).