public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/17902] New: [4.0] ICE from tree_verify_flow_info
@ 2004-10-08 21:54 gcc-bugzilla at gcc dot gnu dot org
2004-10-08 22:08 ` [Bug middle-end/17902] [4.0 Regression] " pinskia at gcc dot gnu dot org
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2004-10-08 21:54 UTC (permalink / raw)
To: gcc-bugs
g++ crashes compiling the code below, when i use
-O3 -mtune=pentiumpro:
$ /usr/local/gcc/libexec/gcc/i686-pc-linux-gnu/4.0.0/cc1plus -quiet x.cc -quiet -mtune=pentiumpro -O3
x.cc: In function `void fill_ntuples()':
x.cc:16: internal compiler error: tree check: expected class 'declaration', have 'statement' (label_expr) in tree_verify_flow_info, at /tree-cfg.c:3504
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
$
At this point, all my attempts to simplify the example further make the
crash go away.
Environment:
System: Linux karma 2.6.8.1 #20 Mon Sep 13 23:48:47 EDT 2004 i686 i686 i386 GNU/Linux
Architecture: i686
<machine, os, target, libraries (multiple lines)>
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /home/sss/gcc/gcc/configure --prefix=/usr/local/gcc --enable-threads=posix --enable-long-long --enable-languages=c,c++,f95
How-To-Repeat:
Compile the code below with -O3 -mtune=pentiumpro.
------------------------------------------------
extern int foo();
bool a;
bool b;
bool f() { return a || b; }
struct A { ~A(){} };
struct vector
{
~vector() { if (f()) foo();}
A _M_impl;
};
void fill_ntuples()
{
vector smt_states;
int nbar4=0;
bool log3 = false;
for (int j=0;j<foo();j++){
int jdeter = foo();
if (0!=j&&jdeter==1) foo();
if (jdeter==1&&0!=j)
{
if (foo()==4){
nbar4++;
}
}
if (foo()==3) log3=true;
}
int jjhi=foo();
for (int jj=0;jj<jjhi;jj++)
{
if (
(jj==0)||
(jj==1&&log3&&nbar4>=3)
)
{
vector substates;
}
}
}
------------------------------------------------
------- Additional Comments From snyder at fnal dot gov 2004-10-08 21:54 -------
Fix:
<how to correct or work around the problem, if known (multiple lines)>
--
Summary: [4.0] ICE from tree_verify_flow_info
Product: gcc
Version: 0.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: snyder at fnal dot gov
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17902
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/17902] [4.0 Regression] ICE from tree_verify_flow_info
2004-10-08 21:54 [Bug middle-end/17902] New: [4.0] ICE from tree_verify_flow_info gcc-bugzilla at gcc dot gnu dot org
@ 2004-10-08 22:08 ` pinskia at gcc dot gnu dot org
2004-10-08 22:10 ` [Bug tree-optimization/17902] " pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-08 22:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-08 22:08 -------
Confirmed but not reduced all the way. This is caused by -funswitch-loops on the tree level.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |rakdver at gcc dot gnu dot
| |org
Keywords| |ice-on-valid-code
Summary|[4.0] ICE from |[4.0 Regression] ICE from
|tree_verify_flow_info |tree_verify_flow_info
Target Milestone|--- |4.0.0
Version|0.0 |2.95
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17902
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/17902] [4.0 Regression] ICE from tree_verify_flow_info
2004-10-08 21:54 [Bug middle-end/17902] New: [4.0] ICE from tree_verify_flow_info gcc-bugzilla at gcc dot gnu dot org
2004-10-08 22:08 ` [Bug middle-end/17902] [4.0 Regression] " pinskia at gcc dot gnu dot org
2004-10-08 22:10 ` [Bug tree-optimization/17902] " pinskia at gcc dot gnu dot org
@ 2004-10-08 22:10 ` pinskia at gcc dot gnu dot org
2004-10-08 22:11 ` [Bug tree-optimization/17902] " pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-08 22:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-08 22:10 -------
This is also exception handling related as -fno-exceptions also does not ICE.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |EH
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17902
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/17902] [4.0 Regression] ICE from tree_verify_flow_info
2004-10-08 21:54 [Bug middle-end/17902] New: [4.0] ICE from tree_verify_flow_info gcc-bugzilla at gcc dot gnu dot org
2004-10-08 22:08 ` [Bug middle-end/17902] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2004-10-08 22:10 ` pinskia at gcc dot gnu dot org
2004-10-08 22:10 ` [Bug middle-end/17902] " pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-08 22:10 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |tree-optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17902
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/17902] [4.0 Regression] ICE from tree_verify_flow_info
2004-10-08 21:54 [Bug middle-end/17902] New: [4.0] ICE from tree_verify_flow_info gcc-bugzilla at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-10-08 22:10 ` [Bug middle-end/17902] " pinskia at gcc dot gnu dot org
@ 2004-10-08 22:11 ` pinskia at gcc dot gnu dot org
2004-10-08 22:24 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-08 22:11 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Version|2.95 |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17902
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/17902] [4.0 Regression] ICE from tree_verify_flow_info
2004-10-08 21:54 [Bug middle-end/17902] New: [4.0] ICE from tree_verify_flow_info gcc-bugzilla at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-10-08 22:11 ` [Bug tree-optimization/17902] " pinskia at gcc dot gnu dot org
@ 2004-10-08 22:24 ` pinskia at gcc dot gnu dot org
2004-10-08 22:38 ` rakdver at gcc dot gnu dot org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-08 22:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-08 22:24 -------
Here is something which produces the least amount of BBs (only one exception handling try/catch
block):
extern int foo();
extern int foo1() throw();
bool a;
bool b;
static inline bool f()throw() { return a || b; }
struct A { ~A()throw(){} };
struct vector
{
~vector() { if (f()) foo1();}
A _M_impl;
};
void fill_ntuples()throw()
{
vector smt_states;
int nbar4=0;
bool log3 = false;
int t = foo1();
for (int j=0;j<t;j++)
{
int jdeter = foo1();
if (0!=j)if(jdeter==1) foo();
if (0!=j)if(jdeter==1)
{
if (foo1()==4){
nbar4++;
}
}
if (foo1()==3) log3=true;
}
int jjhi=foo1();
for (int jj=0;jj<jjhi;jj++)
{
if (jj==1&&log3&&nbar4>=3)
{
vector substates;
}
}
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-10-08 22:24:17
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17902
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/17902] [4.0 Regression] ICE from tree_verify_flow_info
2004-10-08 21:54 [Bug middle-end/17902] New: [4.0] ICE from tree_verify_flow_info gcc-bugzilla at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-10-08 22:24 ` pinskia at gcc dot gnu dot org
@ 2004-10-08 22:38 ` rakdver at gcc dot gnu dot org
2004-10-08 22:39 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2004-10-08 22:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rakdver at gcc dot gnu dot org 2004-10-08 22:38 -------
This seems to be a bug in phi opts. Concretely they must somewhere assume that
there is exactly one label at the start of the basic block, or something like
that. Before phi opts:
;; prev block 11, next block 13
;; pred: 10 [32.6%] (false,exec) 11 [100.0%] (fallthru)
;; succ: 13 [100.0%] (fallthru,dfs_back)
# jj_116 = PHI <1(10), jj_58(11)>;
<L29>:;
<L30>:;
After phi opts:
;; basic block 12, loop depth 1, count 0
;; prev block 10, next block 13
;; pred: 10 [32.6%] (fallthru,exec)
;; succ: 13 [100.0%] (fallthru,dfs_back)
<L29>:;
jj_116 = jj_58;
<L30>:;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17902
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/17902] [4.0 Regression] ICE from tree_verify_flow_info
2004-10-08 21:54 [Bug middle-end/17902] New: [4.0] ICE from tree_verify_flow_info gcc-bugzilla at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-10-08 22:38 ` rakdver at gcc dot gnu dot org
@ 2004-10-08 22:39 ` pinskia at gcc dot gnu dot org
2004-10-08 22:41 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-08 22:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-08 22:39 -------
I will look at it then.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17902
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/17902] [4.0 Regression] ICE from tree_verify_flow_info
2004-10-08 21:54 [Bug middle-end/17902] New: [4.0] ICE from tree_verify_flow_info gcc-bugzilla at gcc dot gnu dot org
` (6 preceding siblings ...)
2004-10-08 22:39 ` pinskia at gcc dot gnu dot org
@ 2004-10-08 22:41 ` pinskia at gcc dot gnu dot org
2004-10-08 22:52 ` reichelt at gcc dot gnu dot org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-08 22:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-08 22:41 -------
Note this does not effect the tcb branch as phi-opt is differently.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17902
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/17902] [4.0 Regression] ICE from tree_verify_flow_info
2004-10-08 21:54 [Bug middle-end/17902] New: [4.0] ICE from tree_verify_flow_info gcc-bugzilla at gcc dot gnu dot org
` (7 preceding siblings ...)
2004-10-08 22:41 ` pinskia at gcc dot gnu dot org
@ 2004-10-08 22:52 ` reichelt at gcc dot gnu dot org
2004-10-08 23:03 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-10-08 22:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-10-08 22:52 -------
Here's something shorter. Maybe related to PR 17766 which is also
triggered by -funswitch-loops.
==============================================
void foo();
struct A { ~A(){ foo(); } };
struct B { A a; };
void bar()
{
A a;
bool b = false;
int i, j;
for (j=0; j<i; j++)
{
if (i) b=true;
if (j && i) foo();
if (j && i) i++;
}
for (j=0; j<i; j++)
if ( !j || (j==1 && b && i) )
B x;
}
==============================================
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17902
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/17902] [4.0 Regression] ICE from tree_verify_flow_info
2004-10-08 21:54 [Bug middle-end/17902] New: [4.0] ICE from tree_verify_flow_info gcc-bugzilla at gcc dot gnu dot org
` (8 preceding siblings ...)
2004-10-08 22:52 ` reichelt at gcc dot gnu dot org
@ 2004-10-08 23:03 ` pinskia at gcc dot gnu dot org
2004-10-08 23:10 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-08 23:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-08 23:03 -------
I have a patch, the problem is that PHI-OPT should be using bsi_after_labels instead of bsi_start.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17902
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/17902] [4.0 Regression] ICE from tree_verify_flow_info
2004-10-08 21:54 [Bug middle-end/17902] New: [4.0] ICE from tree_verify_flow_info gcc-bugzilla at gcc dot gnu dot org
` (9 preceding siblings ...)
2004-10-08 23:03 ` pinskia at gcc dot gnu dot org
@ 2004-10-08 23:10 ` pinskia at gcc dot gnu dot org
2004-10-08 23:24 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-08 23:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-08 23:10 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00792.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17902
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/17902] [4.0 Regression] ICE from tree_verify_flow_info
2004-10-08 21:54 [Bug middle-end/17902] New: [4.0] ICE from tree_verify_flow_info gcc-bugzilla at gcc dot gnu dot org
` (10 preceding siblings ...)
2004-10-08 23:10 ` pinskia at gcc dot gnu dot org
@ 2004-10-08 23:24 ` pinskia at gcc dot gnu dot org
2004-10-08 23:26 ` cvs-commit at gcc dot gnu dot org
2004-10-08 23:30 ` cvs-commit at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-08 23:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-08 23:24 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17902
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/17902] [4.0 Regression] ICE from tree_verify_flow_info
2004-10-08 21:54 [Bug middle-end/17902] New: [4.0] ICE from tree_verify_flow_info gcc-bugzilla at gcc dot gnu dot org
` (11 preceding siblings ...)
2004-10-08 23:24 ` pinskia at gcc dot gnu dot org
@ 2004-10-08 23:26 ` cvs-commit at gcc dot gnu dot org
2004-10-08 23:30 ` cvs-commit at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-08 23:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-10-08 23:26 -------
Subject: Bug 17902
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pinskia@gcc.gnu.org 2004-10-08 23:25:51
Modified files:
gcc : ChangeLog tree-ssa-phiopt.c
Log message:
2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/17902
* tree-ssa-phiopt.c (conditional_replacement): Use bsi_after_labels
instead of bsi_start.
(value_replacement): Likewise.
(abs_replacement): Likewise
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5818&r2=2.5819
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-phiopt.c.diff?cvsroot=gcc&r1=2.16&r2=2.17
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17902
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/17902] [4.0 Regression] ICE from tree_verify_flow_info
2004-10-08 21:54 [Bug middle-end/17902] New: [4.0] ICE from tree_verify_flow_info gcc-bugzilla at gcc dot gnu dot org
` (12 preceding siblings ...)
2004-10-08 23:26 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-08 23:30 ` cvs-commit at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-08 23:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-10-08 23:29 -------
Subject: Bug 17902
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pinskia@gcc.gnu.org 2004-10-08 23:29:36
Modified files:
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/opt: pr17902.C
Log message:
2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/17902
* g++.dg/opt/pr17902.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4417&r2=1.4418
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/pr17902.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17902
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2004-10-08 23:30 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-08 21:54 [Bug middle-end/17902] New: [4.0] ICE from tree_verify_flow_info gcc-bugzilla at gcc dot gnu dot org
2004-10-08 22:08 ` [Bug middle-end/17902] [4.0 Regression] " pinskia at gcc dot gnu dot org
2004-10-08 22:10 ` [Bug tree-optimization/17902] " pinskia at gcc dot gnu dot org
2004-10-08 22:10 ` [Bug middle-end/17902] " pinskia at gcc dot gnu dot org
2004-10-08 22:11 ` [Bug tree-optimization/17902] " pinskia at gcc dot gnu dot org
2004-10-08 22:24 ` pinskia at gcc dot gnu dot org
2004-10-08 22:38 ` rakdver at gcc dot gnu dot org
2004-10-08 22:39 ` pinskia at gcc dot gnu dot org
2004-10-08 22:41 ` pinskia at gcc dot gnu dot org
2004-10-08 22:52 ` reichelt at gcc dot gnu dot org
2004-10-08 23:03 ` pinskia at gcc dot gnu dot org
2004-10-08 23:10 ` pinskia at gcc dot gnu dot org
2004-10-08 23:24 ` pinskia at gcc dot gnu dot org
2004-10-08 23:26 ` cvs-commit at gcc dot gnu dot org
2004-10-08 23:30 ` cvs-commit 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).