public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/37421] New: ICE in vn_reference_insert_pieces at tree-ssa-sccvn.c:1131
@ 2008-09-08 12:15 dnovillo at gcc dot gnu dot org
2008-09-08 12:17 ` [Bug tree-optimization/37421] " rguenth at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2008-09-08 12:15 UTC (permalink / raw)
To: gcc-bugs
Found with this test case. Still have not analyzed it, so I'm not quite sure
where we're getting confused:
#include <stdio.h>
#include <string.h>
inline int
bci (const float &source)
{
int dest;
memcpy (&dest, &source, sizeof (dest));
return dest;
}
inline float
bcf (const int &source)
{
float dest;
memcpy (&dest, &source, sizeof (dest));
return dest;
}
float
Foo ()
{
const int foo = bci (0.0f);
int bar = foo;
const int baz = foo & 1;
if (!baz && (foo & 2))
bar = 0;
return bcf (bar);
}
main ()
{
printf ("Foo() = %f\n", Foo());
}
$ <mainline>/bin/g++ -o mathutil -O2 mathutil.cc
mathutil.cc: In function 'float Foo()':
mathutil.cc:21: internal compiler error: in vn_reference_insert_pieces, at
tree-ssa-sccvn.c:1131
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: ICE in vn_reference_insert_pieces at tree-ssa-
sccvn.c:1131
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dnovillo at gcc dot gnu dot org
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37421
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/37421] ICE in vn_reference_insert_pieces at tree-ssa-sccvn.c:1131
2008-09-08 12:15 [Bug tree-optimization/37421] New: ICE in vn_reference_insert_pieces at tree-ssa-sccvn.c:1131 dnovillo at gcc dot gnu dot org
@ 2008-09-08 12:17 ` rguenth at gcc dot gnu dot org
2008-09-08 12:23 ` rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-09-08 12:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2008-09-08 12:16 -------
I will have a look.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-09-08 12:16:17
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37421
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/37421] ICE in vn_reference_insert_pieces at tree-ssa-sccvn.c:1131
2008-09-08 12:15 [Bug tree-optimization/37421] New: ICE in vn_reference_insert_pieces at tree-ssa-sccvn.c:1131 dnovillo at gcc dot gnu dot org
2008-09-08 12:17 ` [Bug tree-optimization/37421] " rguenth at gcc dot gnu dot org
@ 2008-09-08 12:23 ` rguenth at gcc dot gnu dot org
2008-09-08 14:58 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-09-08 12:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2008-09-08 12:21 -------
ANTIC_OUT[4] := { {view_convert_expr ,integer_cst 0} (0005) }
ANTIC_IN[4] := { {view_convert_expr ,integer_cst 0} (0005) }
S[4] := { {view_convert_expr ,integer_cst 0} (0005) }
so a quick look suggests we fail to properly fold references during PHI
translation.
<bb 4>:
bar_34 = 0;
<bb 5>:
# bar_11 = PHI <bar_33(7), bar_33(6), bar_34(4)>
dest.12_29 = VIEW_CONVERT_EXPR<float>(bar_11);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37421
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/37421] ICE in vn_reference_insert_pieces at tree-ssa-sccvn.c:1131
2008-09-08 12:15 [Bug tree-optimization/37421] New: ICE in vn_reference_insert_pieces at tree-ssa-sccvn.c:1131 dnovillo at gcc dot gnu dot org
2008-09-08 12:17 ` [Bug tree-optimization/37421] " rguenth at gcc dot gnu dot org
2008-09-08 12:23 ` rguenth at gcc dot gnu dot org
@ 2008-09-08 14:58 ` rguenth at gcc dot gnu dot org
2008-09-08 15:15 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-09-08 14:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2008-09-08 14:56 -------
I have a (good on its own) patch to hide the issue, but I'll try to investigate
the issue some more.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37421
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/37421] ICE in vn_reference_insert_pieces at tree-ssa-sccvn.c:1131
2008-09-08 12:15 [Bug tree-optimization/37421] New: ICE in vn_reference_insert_pieces at tree-ssa-sccvn.c:1131 dnovillo at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-09-08 14:58 ` rguenth at gcc dot gnu dot org
@ 2008-09-08 15:15 ` rguenth at gcc dot gnu dot org
2008-09-08 16:33 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-09-08 15:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2008-09-08 15:14 -------
It actually is the correct fix. We valueize expressions in-place, and
copy visiting doesn't follow the chain up until a constant. So we have
a = 0;
= VIEW_CONVERT_EXPR <a>;
b = a;
= VIEW_CONVERT_EXPR <b>;
we first insert VIEW_CONVERT_EXPR <0> in the table, then during processing
of VIEW_CONVERT_EXPR <b> we valueize it to VIEW_CONVERT_EXPR <a> which is
not in the table. During insertion we valueize again, now getting
VIEW_CONVERT_EXPR <0> which is already in the table so we hit the assert.
Bootstrapping and testing the fix now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37421
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/37421] ICE in vn_reference_insert_pieces at tree-ssa-sccvn.c:1131
2008-09-08 12:15 [Bug tree-optimization/37421] New: ICE in vn_reference_insert_pieces at tree-ssa-sccvn.c:1131 dnovillo at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-09-08 15:15 ` rguenth at gcc dot gnu dot org
@ 2008-09-08 16:33 ` rguenth at gcc dot gnu dot org
2008-09-08 16:34 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-09-08 16:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2008-09-08 16:31 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37421
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/37421] ICE in vn_reference_insert_pieces at tree-ssa-sccvn.c:1131
2008-09-08 12:15 [Bug tree-optimization/37421] New: ICE in vn_reference_insert_pieces at tree-ssa-sccvn.c:1131 dnovillo at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-09-08 16:33 ` rguenth at gcc dot gnu dot org
@ 2008-09-08 16:34 ` rguenth at gcc dot gnu dot org
2008-09-08 19:56 ` [Bug tree-optimization/37421] [4.4 Regression] " pinskia at gcc dot gnu dot org
2008-09-08 20:15 ` dnovillo at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-09-08 16:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rguenth at gcc dot gnu dot org 2008-09-08 16:33 -------
Subject: Bug 37421
Author: rguenth
Date: Mon Sep 8 16:31:43 2008
New Revision: 140111
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140111
Log:
2008-09-08 Richard Guenther <rguenther@suse.de>
PR tree-optimization/37421
* tree-ssa-sccvn.c (visit_copy): Make sure to fully
valueize the RHS.
* g++.dg/torture/pr37421.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/torture/pr37421.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-sccvn.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37421
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/37421] [4.4 Regression] ICE in vn_reference_insert_pieces at tree-ssa-sccvn.c:1131
2008-09-08 12:15 [Bug tree-optimization/37421] New: ICE in vn_reference_insert_pieces at tree-ssa-sccvn.c:1131 dnovillo at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-09-08 16:34 ` rguenth at gcc dot gnu dot org
@ 2008-09-08 19:56 ` pinskia at gcc dot gnu dot org
2008-09-08 20:15 ` dnovillo at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-08 19:56 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Keywords| |ice-on-valid-code
Summary|ICE in |[4.4 Regression] ICE in
|vn_reference_insert_pieces |vn_reference_insert_pieces
|at tree-ssa-sccvn.c:1131 |at tree-ssa-sccvn.c:1131
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37421
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/37421] [4.4 Regression] ICE in vn_reference_insert_pieces at tree-ssa-sccvn.c:1131
2008-09-08 12:15 [Bug tree-optimization/37421] New: ICE in vn_reference_insert_pieces at tree-ssa-sccvn.c:1131 dnovillo at gcc dot gnu dot org
` (6 preceding siblings ...)
2008-09-08 19:56 ` [Bug tree-optimization/37421] [4.4 Regression] " pinskia at gcc dot gnu dot org
@ 2008-09-08 20:15 ` dnovillo at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2008-09-08 20:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from dnovillo at gcc dot gnu dot org 2008-09-08 20:13 -------
Subject: Bug 37421
Author: dnovillo
Date: Mon Sep 8 20:12:38 2008
New Revision: 140119
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140119
Log:
2008-09-08 Diego Novillo <dnovillo@google.com>
* tree-ssa-pre.c (gate_pre): Re-enable.
Bring from mainline @140111
2008-09-08 Richard Guenther <rguenther@suse.de>
PR tree-optimization/37421
* tree-ssa-sccvn.c (visit_copy): Make sure to fully
valueize the RHS.
testsuite/ChangeLog.lto:
2008-09-08 Diego Novillo <dnovillo@google.com>
Bring from mainline @140111
2008-09-08 Richard Guenther <rguenther@suse.de>
PR tree-optimization/37421
* g++.dg/torture/pr37421.C: New testcase.
* gcc.dg/lto/lto.exp: Add -pedantic-errors.
* g++.dg/lto/lto.exp: Likewise.
* g++.dg/lto/20080908-1.C: Fix return value of main().
* g++.dg/lto/20080908-3.C: Likewise.
Added:
branches/lto/gcc/testsuite/g++.dg/torture/pr37421.C
- copied unchanged from r140111,
trunk/gcc/testsuite/g++.dg/torture/pr37421.C
Modified:
branches/lto/gcc/ChangeLog.lto
branches/lto/gcc/testsuite/ChangeLog.lto
branches/lto/gcc/testsuite/g++.dg/lto/20080908-1.C
branches/lto/gcc/testsuite/g++.dg/lto/20080908-3.C
branches/lto/gcc/testsuite/g++.dg/lto/lto.exp
branches/lto/gcc/testsuite/gcc.dg/lto/lto.exp
branches/lto/gcc/tree-ssa-pre.c
branches/lto/gcc/tree-ssa-sccvn.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37421
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-09-08 20:15 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-08 12:15 [Bug tree-optimization/37421] New: ICE in vn_reference_insert_pieces at tree-ssa-sccvn.c:1131 dnovillo at gcc dot gnu dot org
2008-09-08 12:17 ` [Bug tree-optimization/37421] " rguenth at gcc dot gnu dot org
2008-09-08 12:23 ` rguenth at gcc dot gnu dot org
2008-09-08 14:58 ` rguenth at gcc dot gnu dot org
2008-09-08 15:15 ` rguenth at gcc dot gnu dot org
2008-09-08 16:33 ` rguenth at gcc dot gnu dot org
2008-09-08 16:34 ` rguenth at gcc dot gnu dot org
2008-09-08 19:56 ` [Bug tree-optimization/37421] [4.4 Regression] " pinskia at gcc dot gnu dot org
2008-09-08 20:15 ` 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).