public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/17528] New: tree optimization incorrectly optimizes away entire function (incorrect aliasing detection?)
@ 2004-09-16 21:50 rearnsha at gcc dot gnu dot org
2004-09-16 21:52 ` [Bug tree-optimization/17528] " rearnsha at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2004-09-16 21:50 UTC (permalink / raw)
To: gcc-bugs
The attached testcase (which comes from a locally modified version of the
compiler) demonstrates a case where the entire body of a function is replaced by
returning 0.
Compile attached testcase with -O2.
compiling with -fno-strict-aliasing produces correct code, but there don't
appear to be any possible alias problems with this code (and certainly no
warning is generated for that).
--
Summary: tree optimization incorrectly optimizes away entire
function (incorrect aliasing detection?)
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rearnsha at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i386-netbsdelf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17528
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/17528] tree optimization incorrectly optimizes away entire function (incorrect aliasing detection?)
2004-09-16 21:50 [Bug tree-optimization/17528] New: tree optimization incorrectly optimizes away entire function (incorrect aliasing detection?) rearnsha at gcc dot gnu dot org
@ 2004-09-16 21:52 ` rearnsha at gcc dot gnu dot org
2004-09-16 21:58 ` dnovillo at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2004-09-16 21:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rearnsha at gcc dot gnu dot org 2004-09-16 21:52 -------
Created an attachment (id=7157)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7157&action=view)
testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17528
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/17528] tree optimization incorrectly optimizes away entire function (incorrect aliasing detection?)
2004-09-16 21:50 [Bug tree-optimization/17528] New: tree optimization incorrectly optimizes away entire function (incorrect aliasing detection?) rearnsha at gcc dot gnu dot org
2004-09-16 21:52 ` [Bug tree-optimization/17528] " rearnsha at gcc dot gnu dot org
@ 2004-09-16 21:58 ` dnovillo at gcc dot gnu dot org
2004-09-16 22:10 ` [Bug tree-optimization/17528] [4.0 Regression] " pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2004-09-16 21:58 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |dnovillo at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17528
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/17528] [4.0 Regression] tree optimization incorrectly optimizes away entire function (incorrect aliasing detection?)
2004-09-16 21:50 [Bug tree-optimization/17528] New: tree optimization incorrectly optimizes away entire function (incorrect aliasing detection?) rearnsha at gcc dot gnu dot org
2004-09-16 21:52 ` [Bug tree-optimization/17528] " rearnsha at gcc dot gnu dot org
2004-09-16 21:58 ` dnovillo at gcc dot gnu dot org
@ 2004-09-16 22:10 ` pinskia at gcc dot gnu dot org
2004-09-16 22:15 ` dnovillo at redhat dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-16 22:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-16 22:10 -------
hmm, DCE is removing a COND_EXPR and some BB for some reason:
if (D.19406_5 != 0B) goto <L0>; else goto <L2>;
I cannot figure out why yet.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
Summary|tree optimization |[4.0 Regression] tree
|incorrectly optimizes away |optimization incorrectly
|entire function (incorrect |optimizes away entire
|aliasing detection?) |function (incorrect aliasing
| |detection?)
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17528
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/17528] [4.0 Regression] tree optimization incorrectly optimizes away entire function (incorrect aliasing detection?)
2004-09-16 21:50 [Bug tree-optimization/17528] New: tree optimization incorrectly optimizes away entire function (incorrect aliasing detection?) rearnsha at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-09-16 22:10 ` [Bug tree-optimization/17528] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2004-09-16 22:15 ` dnovillo at redhat dot com
2004-09-16 22:36 ` dnovillo at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dnovillo at redhat dot com @ 2004-09-16 22:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dnovillo at redhat dot com 2004-09-16 22:15 -------
Subject: Re: [4.0 Regression] tree
optimization incorrectly optimizes away entire function (incorrect aliasing
detection?)
On Thu, 2004-09-16 at 18:10, pinskia at gcc dot gnu dot org wrote:
> ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-16 22:10 -------
> hmm, DCE is removing a COND_EXPR and some BB for some reason:
> if (D.19406_5 != 0B) goto <L0>; else goto <L2>;
>
> I cannot figure out why yet.
>
One of the libstdc++ tests I'm looking at has similar symptoms. We take
the address of a variable that makes its way into some field in a
structure which we fail to relate in the alias analyzer.
Still not completely sure why the alias sets of the two objects don't
conflict.
Diego.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17528
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/17528] [4.0 Regression] tree optimization incorrectly optimizes away entire function (incorrect aliasing detection?)
2004-09-16 21:50 [Bug tree-optimization/17528] New: tree optimization incorrectly optimizes away entire function (incorrect aliasing detection?) rearnsha at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-09-16 22:15 ` dnovillo at redhat dot com
@ 2004-09-16 22:36 ` dnovillo at gcc dot gnu dot org
2004-09-17 1:10 ` cvs-commit at gcc dot gnu dot org
2004-09-17 1:28 ` dnovillo at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2004-09-16 22:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dnovillo at gcc dot gnu dot org 2004-09-16 22:36 -------
Found the problem. This is the same problem we have with the libstc++ regressions.
Testing patch now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17528
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/17528] [4.0 Regression] tree optimization incorrectly optimizes away entire function (incorrect aliasing detection?)
2004-09-16 21:50 [Bug tree-optimization/17528] New: tree optimization incorrectly optimizes away entire function (incorrect aliasing detection?) rearnsha at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-09-16 22:36 ` dnovillo at gcc dot gnu dot org
@ 2004-09-17 1:10 ` cvs-commit at gcc dot gnu dot org
2004-09-17 1:28 ` dnovillo at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-17 1:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-09-17 01:10 -------
Subject: Bug 17528
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: dnovillo@gcc.gnu.org 2004-09-17 01:10:30
Modified files:
gcc : ChangeLog tree-ssa-alias.c
Log message:
PR tree-optimization/17528
* tree-ssa-alias.c (compute_flow_insensitive_aliasing): Do not
erase the may-alias set for a tag when merging it with
another.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5486&r2=2.5487
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-alias.c.diff?cvsroot=gcc&r1=2.35&r2=2.36
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17528
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/17528] [4.0 Regression] tree optimization incorrectly optimizes away entire function (incorrect aliasing detection?)
2004-09-16 21:50 [Bug tree-optimization/17528] New: tree optimization incorrectly optimizes away entire function (incorrect aliasing detection?) rearnsha at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-09-17 1:10 ` cvs-commit at gcc dot gnu dot org
@ 2004-09-17 1:28 ` dnovillo at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2004-09-17 1:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dnovillo at gcc dot gnu dot org 2004-09-17 01:28 -------
Fix: http://gcc.gnu.org/ml/gcc-patches/2004-09/msg01725.html
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17528
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-09-17 1:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-16 21:50 [Bug tree-optimization/17528] New: tree optimization incorrectly optimizes away entire function (incorrect aliasing detection?) rearnsha at gcc dot gnu dot org
2004-09-16 21:52 ` [Bug tree-optimization/17528] " rearnsha at gcc dot gnu dot org
2004-09-16 21:58 ` dnovillo at gcc dot gnu dot org
2004-09-16 22:10 ` [Bug tree-optimization/17528] [4.0 Regression] " pinskia at gcc dot gnu dot org
2004-09-16 22:15 ` dnovillo at redhat dot com
2004-09-16 22:36 ` dnovillo at gcc dot gnu dot org
2004-09-17 1:10 ` cvs-commit at gcc dot gnu dot org
2004-09-17 1:28 ` dnovillo at gcc dot gnu dot 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).