public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/59690] New: GCC fails to fold operations on frame-allocated variable across function call
@ 2014-01-05 23:09 patrick at parcs dot ath.cx
2014-01-05 23:12 ` [Bug tree-optimization/59690] " pinskia at gcc dot gnu.org
2014-01-05 23:14 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: patrick at parcs dot ath.cx @ 2014-01-05 23:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59690
Bug ID: 59690
Summary: GCC fails to fold operations on frame-allocated
variable across function call
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: patrick at parcs dot ath.cx
In the following testcase
void bar (void);
void baz (int *);
void
foo (void)
{
int x;
x = 5;
bar ();
x += 10;
baz (&x);
x += 15;
bar ();
x += 20;
baz (&x);
}
GCC does not transform the sequence { x = 5; bar (); x += 10; ... } into { x =
15; bar (); ... }. It seems to think that the frame-allocated "x" is global
memory.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/59690] GCC fails to fold operations on frame-allocated variable across function call
2014-01-05 23:09 [Bug tree-optimization/59690] New: GCC fails to fold operations on frame-allocated variable across function call patrick at parcs dot ath.cx
@ 2014-01-05 23:12 ` pinskia at gcc dot gnu.org
2014-01-05 23:14 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-01-05 23:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59690
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>It seems to think that the frame-allocated "x" is global memory.
No it thinks it has already escaped the function because right now escape
analysis is not flow sensitive.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/59690] GCC fails to fold operations on frame-allocated variable across function call
2014-01-05 23:09 [Bug tree-optimization/59690] New: GCC fails to fold operations on frame-allocated variable across function call patrick at parcs dot ath.cx
2014-01-05 23:12 ` [Bug tree-optimization/59690] " pinskia at gcc dot gnu.org
@ 2014-01-05 23:14 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-01-05 23:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59690
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> >It seems to think that the frame-allocated "x" is global memory.
>
> No it thinks it has already escaped the function because right now escape
> analysis is not flow sensitive.
Well the clobber list that is. Dup of bug 23384.
*** This bug has been marked as a duplicate of bug 23384 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-05 23:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-05 23:09 [Bug tree-optimization/59690] New: GCC fails to fold operations on frame-allocated variable across function call patrick at parcs dot ath.cx
2014-01-05 23:12 ` [Bug tree-optimization/59690] " pinskia at gcc dot gnu.org
2014-01-05 23:14 ` pinskia 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).