public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/22415] New: ICE in coalesce_abnormal_edges
@ 2005-07-11 19:51 jakub at redhat dot com
2005-07-11 20:02 ` [Bug tree-optimization/22415] [4.0 Regression] " pinskia at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: jakub at redhat dot com @ 2005-07-11 19:51 UTC (permalink / raw)
To: gcc-bugs
struct C
{
int a;
int *b;
int *c1 (int x) { return new int[sizeof (int) * x]; }
void c2 (int *x, int *y, int z)
{
for (int i = 0; i < z; i++)
y[i] = x[i];
}
C (int x = 0) : a (x)
{
if (a)
{
b = c1 (a);
for (int i = 0; i < a; i++)
b[i] = 0;
}
}
C (const C & x) : a (x.a)
{
if (a)
{
b = c1 (a);
c2 (x.b, b, a);
}
}
~C (void) { if (a) delete b; }
int &operator [] (int x)
{
if (a == 0 && x == 0)
{
a = 1;
b = c1 (1);
b[0] = 0;
}
else
{
C e (*this);
a = x + 1;
b = c1 (a);
c2 (e.b, b, e.a);
for (int i = e.a; i < a; i++)
b[i] = 0;
}
return b[x];
}
C & operator << (int x) { (*this)[a] = x; return *this; }
};
int
bar (void)
{
C a;
int f = 1;
while (f != -1)
{
f = 0;
a << 1;
}
return 0;
}
ICEs at -O2 in coalesce_abnormal_edges. The bug is not present on HEAD
and 3.4.x compiles it just fine as well.
--
Summary: ICE in coalesce_abnormal_edges
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at redhat dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22415
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/22415] [4.0 Regression] ICE in coalesce_abnormal_edges
2005-07-11 19:51 [Bug tree-optimization/22415] New: ICE in coalesce_abnormal_edges jakub at redhat dot com
@ 2005-07-11 20:02 ` pinskia at gcc dot gnu dot org
2005-07-11 20:16 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-11 20:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-11 19:56 -------
Confirmed, this might be a latent bug on the mainline.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Known to fail| |4.0.0
Known to work| |3.4.0
Last reconfirmed|0000-00-00 00:00:00 |2005-07-11 19:56:04
date| |
Summary|ICE in |[4.0 Regression] ICE in
|coalesce_abnormal_edges |coalesce_abnormal_edges
Target Milestone|--- |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22415
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/22415] [4.0 Regression] ICE in coalesce_abnormal_edges
2005-07-11 19:51 [Bug tree-optimization/22415] New: ICE in coalesce_abnormal_edges jakub at redhat dot com
2005-07-11 20:02 ` [Bug tree-optimization/22415] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2005-07-11 20:16 ` pinskia at gcc dot gnu dot org
2005-07-11 20:50 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-11 20:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-11 20:12 -------
Hmm, the reason why we cannot reproduce it on the mainline is because SRA thinks the variable a
cannot be SRA'd because we still take the address of the variable even though that statement is dead.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22415
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/22415] [4.0 Regression] ICE in coalesce_abnormal_edges
2005-07-11 19:51 [Bug tree-optimization/22415] New: ICE in coalesce_abnormal_edges jakub at redhat dot com
2005-07-11 20:02 ` [Bug tree-optimization/22415] [4.0 Regression] " pinskia at gcc dot gnu dot org
2005-07-11 20:16 ` pinskia at gcc dot gnu dot org
@ 2005-07-11 20:50 ` pinskia at gcc dot gnu dot org
2005-07-13 12:56 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-11 20:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-11 20:15 -------
I think adding another DCE pass right before SRA and we will be able to reproduce this on the mainline
also.
Also note turning off PRE "fixes" the ICE. It might be PRE moving a statement causing the conflict.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |dberlin at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22415
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/22415] [4.0 Regression] ICE in coalesce_abnormal_edges
2005-07-11 19:51 [Bug tree-optimization/22415] New: ICE in coalesce_abnormal_edges jakub at redhat dot com
` (2 preceding siblings ...)
2005-07-11 20:50 ` pinskia at gcc dot gnu dot org
@ 2005-07-13 12:56 ` pinskia at gcc dot gnu dot org
2005-07-13 13:12 ` dberlin at gcc dot gnu dot org
2005-09-27 16:25 ` mmitchel at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-13 12:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-13 12:54 -------
(In reply to comment #3)
> I think adding another DCE pass right before SRA and we will be able to reproduce this on the
mainline
> also.
Nope, adding both DCE and MAY_ALIAS right before SRA does not cause this to happen on the
mainline.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22415
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/22415] [4.0 Regression] ICE in coalesce_abnormal_edges
2005-07-11 19:51 [Bug tree-optimization/22415] New: ICE in coalesce_abnormal_edges jakub at redhat dot com
` (3 preceding siblings ...)
2005-07-13 12:56 ` pinskia at gcc dot gnu dot org
@ 2005-07-13 13:12 ` dberlin at gcc dot gnu dot org
2005-09-27 16:25 ` mmitchel at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2005-07-13 13:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dberlin at gcc dot gnu dot org 2005-07-13 13:08 -------
PRE checks the SSA_NAME_OCCURS_IN_ABNORMAL_PHI flag everywhere, and we shouldn't
really be doing anything over abnormal edges.
(see compute_avail and compute_antic).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22415
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/22415] [4.0 Regression] ICE in coalesce_abnormal_edges
2005-07-11 19:51 [Bug tree-optimization/22415] New: ICE in coalesce_abnormal_edges jakub at redhat dot com
` (4 preceding siblings ...)
2005-07-13 13:12 ` dberlin at gcc dot gnu dot org
@ 2005-09-27 16:25 ` mmitchel at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 16:25 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.2 |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22415
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-09-27 16:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-11 19:51 [Bug tree-optimization/22415] New: ICE in coalesce_abnormal_edges jakub at redhat dot com
2005-07-11 20:02 ` [Bug tree-optimization/22415] [4.0 Regression] " pinskia at gcc dot gnu dot org
2005-07-11 20:16 ` pinskia at gcc dot gnu dot org
2005-07-11 20:50 ` pinskia at gcc dot gnu dot org
2005-07-13 12:56 ` pinskia at gcc dot gnu dot org
2005-07-13 13:12 ` dberlin at gcc dot gnu dot org
2005-09-27 16:25 ` mmitchel 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).