* [Bug c++/23948] internal compiler error: verify_stmts failed
2005-09-18 13:12 [Bug c++/23948] New: internal compiler error: verify_stmts failed harold at alum dot mit dot edu
@ 2005-09-18 13:16 ` harold at alum dot mit dot edu
2005-09-18 15:30 ` harold at alum dot mit dot edu
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: harold at alum dot mit dot edu @ 2005-09-18 13:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From harold at alum dot mit dot edu 2005-09-18 13:16 -------
Created an attachment (id=9764)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9764&action=view)
preprocessed output with -save-temps
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/23948] internal compiler error: verify_stmts failed
2005-09-18 13:12 [Bug c++/23948] New: internal compiler error: verify_stmts failed harold at alum dot mit dot edu
2005-09-18 13:16 ` [Bug c++/23948] " harold at alum dot mit dot edu
@ 2005-09-18 15:30 ` harold at alum dot mit dot edu
2005-09-18 16:33 ` pinskia at gcc dot gnu dot org
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: harold at alum dot mit dot edu @ 2005-09-18 15:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From harold at alum dot mit dot edu 2005-09-18 15:30 -------
Works in 4.0 cvs.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/23948] internal compiler error: verify_stmts failed
2005-09-18 13:12 [Bug c++/23948] New: internal compiler error: verify_stmts failed harold at alum dot mit dot edu
2005-09-18 13:16 ` [Bug c++/23948] " harold at alum dot mit dot edu
2005-09-18 15:30 ` harold at alum dot mit dot edu
@ 2005-09-18 16:33 ` pinskia at gcc dot gnu dot org
2005-09-18 18:02 ` harold at alum dot mit dot edu
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-18 16:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-18 16:33 -------
How did you compile the file?
Also what is the date on 4.1.0?
I tried -O[0-3] with "4.1.0 20050916" and I could not reproduce this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/23948] internal compiler error: verify_stmts failed
2005-09-18 13:12 [Bug c++/23948] New: internal compiler error: verify_stmts failed harold at alum dot mit dot edu
` (2 preceding siblings ...)
2005-09-18 16:33 ` pinskia at gcc dot gnu dot org
@ 2005-09-18 18:02 ` harold at alum dot mit dot edu
2005-09-18 18:06 ` pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: harold at alum dot mit dot edu @ 2005-09-18 18:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From harold at alum dot mit dot edu 2005-09-18 18:02 -------
OK, please bear with me. I'm not as talented as you at this, but I'm trying.
I think we're both using the 9/16/05 build, since the top entry in the
"ChangeLog" file is 9/16/05.
The compile command that generates the error is:
g++-4.1 -DHAVE_CONFIG_H -I. -I. -I.. -I ./win -I../lib -I../api -I../db
-I../RSAEuro/source -I../client -I../tools -I../sched -pthread -include
../config.h -O3 -D__NO_CTYPE -I../lib -I../api -I../db -I../RSAEuro/source
-I../client -I../tools -I../sched -pthread -include ../config.h -DACML -O3
-ffast-math -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops
-ftree-vectorize -march=k8 -g -pthread -MT boinc_client-cs_scheduler.o -MD -MP
-MF ".deps/boinc_client-cs_scheduler.Tpo" -c -o boinc_client-cs_scheduler.o
cs_scheduler.C cs_scheduler.C: In member function 'int
CLIENT_STATE::make_scheduler_request(PROJECT*)':
cs_scheduler.C:200: error: statement marked for throw in middle of block
# bufD.54331_943(ab) = V_MAY_DEF <bufD.54331_939>;
# SFT.1187D.68458_944(ab) = V_MAY_DEF <SFT.1187D.68458_940>;
# SFT.1188D.68459_945(ab) = V_MAY_DEF <SFT.1188D.68459_941>;
# SFT.1189D.68460_946(ab) = V_MAY_DEF <SFT.1189D.68460_942>;
prrsD.54346_136 = potentially_runnable_resource_share (thisD.54329_135);
cs_scheduler.C:200: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
>From this command, do you need me to post any other files? I can't really tell,
to be honest, since I'm not too sure what all those -M flags do.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/23948] internal compiler error: verify_stmts failed
2005-09-18 13:12 [Bug c++/23948] New: internal compiler error: verify_stmts failed harold at alum dot mit dot edu
` (3 preceding siblings ...)
2005-09-18 18:02 ` harold at alum dot mit dot edu
@ 2005-09-18 18:06 ` pinskia at gcc dot gnu dot org
2005-09-18 18:10 ` pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-18 18:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-18 18:06 -------
(In reply to comment #4)
> From this command, do you need me to post any other files? I can't really tell,
> to be honest, since I'm not too sure what all those -M flags do.
No I can reproduce it now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/23948] internal compiler error: verify_stmts failed
2005-09-18 13:12 [Bug c++/23948] New: internal compiler error: verify_stmts failed harold at alum dot mit dot edu
` (4 preceding siblings ...)
2005-09-18 18:06 ` pinskia at gcc dot gnu dot org
@ 2005-09-18 18:10 ` pinskia at gcc dot gnu dot org
2005-09-18 18:17 ` [Bug tree-optimization/23948] [4.1 Regression] " pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-18 18:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-18 18:10 -------
Note only -O3 -ffast-math is required to reproduce this bug.
Reducing.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed
2005-09-18 13:12 [Bug c++/23948] New: internal compiler error: verify_stmts failed harold at alum dot mit dot edu
` (5 preceding siblings ...)
2005-09-18 18:10 ` pinskia at gcc dot gnu dot org
@ 2005-09-18 18:17 ` pinskia at gcc dot gnu dot org
2005-09-18 18:54 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-18 18:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-18 18:16 -------
-O2 -finline-functions -ffast-math is enough to reproduce this.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org, hubicka at gcc dot gnu
| |dot org
Component|c++ |tree-optimization
Summary|internal compiler error: |[4.1 Regression] internal
|verify_stmts failed |compiler error: verify_stmts
| |failed
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed
2005-09-18 13:12 [Bug c++/23948] New: internal compiler error: verify_stmts failed harold at alum dot mit dot edu
` (6 preceding siblings ...)
2005-09-18 18:17 ` [Bug tree-optimization/23948] [4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-09-18 18:54 ` pinskia at gcc dot gnu dot org
2005-09-20 21:28 ` janis187 at us dot ibm dot com
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-18 18:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-18 18:54 -------
Reduced testcase:
struct MIOFILE {
~MIOFILE();
};
double potentially_runnable_resource_share();
void f1(double);
int make_scheduler_request(double a)
{
MIOFILE mf;
double prrs = potentially_runnable_resource_share();
f1(a/prrs);
f1(1/prrs);
}
---
-O1 -ffast-math is enough to reproduce this reduced testcase.
This is caused by the recip pass.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |bonzini at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
GCC build triplet|x86_64-linux-gnu |
GCC host triplet|x86_64-linux-gnu |
GCC target triplet|x86_64-linux-gnu |
Last reconfirmed|0000-00-00 00:00:00 |2005-09-18 18:54:12
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed
2005-09-18 13:12 [Bug c++/23948] New: internal compiler error: verify_stmts failed harold at alum dot mit dot edu
` (7 preceding siblings ...)
2005-09-18 18:54 ` pinskia at gcc dot gnu dot org
@ 2005-09-20 21:28 ` janis187 at us dot ibm dot com
2005-09-21 8:13 ` bonzini at gcc dot gnu dot org
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: janis187 at us dot ibm dot com @ 2005-09-20 21:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From janis187 at us dot ibm dot com 2005-09-20 21:28 -------
The ICE begins with these patches (the second adds a missing file for the first)
from bonzini:
http://gcc.gnu.org/ml/gcc-cvs/2005-05/msg00791.html
http://gcc.gnu.org/ml/gcc-cvs/2005-05/msg00792.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed
2005-09-18 13:12 [Bug c++/23948] New: internal compiler error: verify_stmts failed harold at alum dot mit dot edu
` (8 preceding siblings ...)
2005-09-20 21:28 ` janis187 at us dot ibm dot com
@ 2005-09-21 8:13 ` bonzini at gcc dot gnu dot org
2005-09-21 14:19 ` rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2005-09-21 8:13 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |bonzini at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2005-09-18 18:54:12 |2005-09-21 08:12:59
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed
2005-09-18 13:12 [Bug c++/23948] New: internal compiler error: verify_stmts failed harold at alum dot mit dot edu
` (9 preceding siblings ...)
2005-09-21 8:13 ` bonzini at gcc dot gnu dot org
@ 2005-09-21 14:19 ` rguenth at gcc dot gnu dot org
2005-09-21 14:33 ` paolo dot bonzini at lu dot unisi dot ch
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-09-21 14:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-21 14:18 -------
We insert the reciprocal computation correctly after the call to
double prrs = potentially_runnable_resource_share();
but as this call may trap and is the last instruction in the basic block,
inserting there is obviously bogous.
We'd need to insert a new BB or need a way to insert on the EXIT_EDGE. And
make sure critical edges are split.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed
2005-09-18 13:12 [Bug c++/23948] New: internal compiler error: verify_stmts failed harold at alum dot mit dot edu
` (10 preceding siblings ...)
2005-09-21 14:19 ` rguenth at gcc dot gnu dot org
@ 2005-09-21 14:33 ` paolo dot bonzini at lu dot unisi dot ch
2005-09-21 14:44 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: paolo dot bonzini at lu dot unisi dot ch @ 2005-09-21 14:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From paolo dot bonzini at lu dot unisi dot ch 2005-09-21 14:33 -------
Subject: Re: [4.1 Regression] internal compiler
error: verify_stmts failed
rguenth at gcc dot gnu dot org wrote:
>------- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-21 14:18 -------
>We insert the reciprocal computation correctly after the call to
> double prrs = potentially_runnable_resource_share();
>but as this call may trap and is the last instruction in the basic block,
>inserting there is obviously bogous.
>
>We'd need to insert a new BB or need a way to insert on the EXIT_EDGE. And
>make sure critical edges are split.
>
>
No, I think we have to rethink the place where we insert the division.
It needs to be closer to the divide (just before), not right after the
definition. When we have flag_trapping_math, this is quite hard to do
(there may be even multiple places to insert the divide!).
I also did not understand why you had to fiddle with postdominators :-)
to fix PR23309. I have a prototype patch but it will probably be a
while before I can sit, look if it really works, and test it properly.
Paolo
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed
2005-09-18 13:12 [Bug c++/23948] New: internal compiler error: verify_stmts failed harold at alum dot mit dot edu
` (11 preceding siblings ...)
2005-09-21 14:33 ` paolo dot bonzini at lu dot unisi dot ch
@ 2005-09-21 14:44 ` rguenth at gcc dot gnu dot org
2005-09-22 7:00 ` bonzini at gcc dot gnu dot org
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-09-21 14:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-21 14:44 -------
Fixing like the following, but inserting onto the right edge(s) -
single_succ_edge actually doesn't work here.
diff -c -3 -p -r2.5 tree-ssa-math-opts.c
*** tree-ssa-math-opts.c 9 Aug 2005 03:28:32 -0000 2.5
--- tree-ssa-math-opts.c 21 Sep 2005 14:43:08 -0000
*************** execute_cse_reciprocals_1 (block_stmt_it
*** 111,117 ****
if (where == PR_BEFORE_BSI)
bsi_insert_before (bsi, new_stmt, BSI_SAME_STMT);
else if (where == PR_AFTER_BSI)
! bsi_insert_after (bsi, new_stmt, BSI_NEW_STMT);
else if (where == PR_ON_ENTRY_EDGE)
bsi_insert_on_edge (single_succ_edge (ENTRY_BLOCK_PTR), new_stmt);
else
--- 111,122 ----
if (where == PR_BEFORE_BSI)
bsi_insert_before (bsi, new_stmt, BSI_SAME_STMT);
else if (where == PR_AFTER_BSI)
! {
! if (stmt_ends_bb_p (bsi_stmt (*bsi)))
! bsi_insert_on_edge (single_succ_edge (bsi->bb), new_stmt);
! else
! bsi_insert_after (bsi, new_stmt, BSI_NEW_STMT);
! }
else if (where == PR_ON_ENTRY_EDGE)
bsi_insert_on_edge (single_succ_edge (ENTRY_BLOCK_PTR), new_stmt);
else
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed
2005-09-18 13:12 [Bug c++/23948] New: internal compiler error: verify_stmts failed harold at alum dot mit dot edu
` (12 preceding siblings ...)
2005-09-21 14:44 ` rguenth at gcc dot gnu dot org
@ 2005-09-22 7:00 ` bonzini at gcc dot gnu dot org
2005-09-22 7:09 ` bonzini at gcc dot gnu dot org
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2005-09-22 7:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bonzini at gcc dot gnu dot org 2005-09-22 07:00 -------
I don't know the tree-cfg bits very well, but the patch seems wrong; you are not
committing the edge insertion.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed
2005-09-18 13:12 [Bug c++/23948] New: internal compiler error: verify_stmts failed harold at alum dot mit dot edu
` (13 preceding siblings ...)
2005-09-22 7:00 ` bonzini at gcc dot gnu dot org
@ 2005-09-22 7:09 ` bonzini at gcc dot gnu dot org
2005-09-23 9:58 ` bonzini at gcc dot gnu dot org
2005-09-25 12:48 ` bonzini at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2005-09-22 7:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bonzini at gcc dot gnu dot org 2005-09-22 07:09 -------
I have a patch but it only works in the -fno-trapping-math case. Given that
trapping math is much more complex, that the code quality improves for
-ftrapping-math, and that we are late in the development of 4.1, I'll probably
punt and disable the optimization for -ftrapping-math.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed
2005-09-18 13:12 [Bug c++/23948] New: internal compiler error: verify_stmts failed harold at alum dot mit dot edu
` (14 preceding siblings ...)
2005-09-22 7:09 ` bonzini at gcc dot gnu dot org
@ 2005-09-23 9:58 ` bonzini at gcc dot gnu dot org
2005-09-25 12:48 ` bonzini at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2005-09-23 9:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bonzini at gcc dot gnu dot org 2005-09-23 09:58 -------
I've rewritten execute_cse_reciprocals, I think the only useful solution is to
implement the optimal scheme for inserting reciprocals, and fix this bug in the
process.
My algorithm builds a "mock" dominator tree including only the basic blocks with
the divides and their common dominators, and then inserts divides whenever it is
necessary to satisfy these conditions:
1) if -ftrapping-math, the basic block must have one divide
2) in addition, at least two divides must either be in the basic block, or
postdominate it.
I still have to run some coverage tests, then I'll post the patch. If anybody
wants to help, I'd be thankful.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/23948] [4.1 Regression] internal compiler error: verify_stmts failed
2005-09-18 13:12 [Bug c++/23948] New: internal compiler error: verify_stmts failed harold at alum dot mit dot edu
` (15 preceding siblings ...)
2005-09-23 9:58 ` bonzini at gcc dot gnu dot org
@ 2005-09-25 12:48 ` bonzini at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2005-09-25 12:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bonzini at gcc dot gnu dot org 2005-09-25 12:48 -------
Posted the patch for the algorithm I had sketched in the previous comments.
--
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2005-
| |09/msg01555.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23948
^ permalink raw reply [flat|nested] 18+ messages in thread