[Bug tree-optimization/18712] [4.0 Regression] ICE: vector VEC(basic_block) push domain error, in insert_phi_nodes_for at tree-into-ssa.c:1049
--- Additional Comments From belyshev at lubercy dot com 2004-11-29 08:03 --- Introduced by this patch: 2004-11-23 Diego Novillo [EMAIL PROTECTED] PR tree-optimization/18618 * tree-into-ssa.c (DEF_VEC_MALLOC_P(basic_block)): Declare. (insert_phi_nodes_for): Change third argument to VEC(basic_block). -- What|Removed |Added Severity|normal |critical Status|UNCONFIRMED |NEW Ever Confirmed||1 Last reconfirmed|-00-00 00:00:00 |2004-11-29 08:03:36 date|| Target Milestone|--- |4.0.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18712
[Bug tree-optimization/18712] [4.0 Regression] ICE: vector VEC(basic_block) push domain error, in insert_phi_nodes_for at tree-into-ssa.c:1049
--- Additional Comments From aj at gcc dot gnu dot org 2004-11-29 09:58 --- The same error occurs for me on Linux/ia64 and Linux/x86-64. Diego, this seems to have been introduced by one of your patches. Could you look at it, please? -- What|Removed |Added CC||dnovillo at redhat dot com, ||aj at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18712
[Bug tree-optimization/18712] [4.0 Regression] ICE: vector VEC(basic_block) push domain error, in insert_phi_nodes_for at tree-into-ssa.c:1049
--- Additional Comments From steven at gcc dot gnu dot org 2004-11-29 10:21 --- Try this. Index: tree-into-ssa.c === RCS file: /cvs/gcc/gcc/gcc/tree-into-ssa.c,v retrieving revision 2.33 diff -u -3 -p -r2.33 tree-into-ssa.c --- tree-into-ssa.c 25 Nov 2004 22:31:08 - 2.33 +++ tree-into-ssa.c 29 Nov 2004 10:21:04 - @@ -1017,7 +1017,7 @@ insert_phi_nodes_for (tree var, bitmap * EXECUTE_IF_SET_IN_BITMAP (def_map-def_blocks, 0, bb_index, bi) { - VEC_quick_push (basic_block, work_stack, BASIC_BLOCK (bb_index)); + VEC_safe_push (basic_block, work_stack, BASIC_BLOCK (bb_index)); } /* Pop a block off the worklist, add every block that appears in @@ -1046,7 +1046,7 @@ insert_phi_nodes_for (tree var, bitmap * { basic_block bb = BASIC_BLOCK (dfs_index); - VEC_quick_push (basic_block, work_stack, bb); + VEC_safe_push (basic_block, work_stack, bb); bitmap_set_bit (phi_insertion_points, dfs_index); } } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18712
[Bug tree-optimization/18712] [4.0 Regression] ICE: vector VEC(basic_block) push domain error, in insert_phi_nodes_for at tree-into-ssa.c:1049
--- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-29 13:37 --- Steven's patch should work ... -- What|Removed |Added CC||pinskia at gcc dot gnu dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18712
[Bug tree-optimization/18712] [4.0 Regression] ICE: vector VEC(basic_block) push domain error, in insert_phi_nodes_for at tree-into-ssa.c:1049
--- Additional Comments From dnovillo at redhat dot com 2004-11-29 13:42 --- Subject: Re: [4.0 Regression] ICE: vector VEC(basic_block) push domain error, in insert_phi_nodes_for at tree-into-ssa.c:1049 On Mon, 2004-11-29 at 13:37 +, pinskia at gcc dot gnu dot org wrote: --- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-29 13:37 --- Steven's patch should work ... But it should not be necessary. One thing that needs to change, however is: --- tree-into-ssa.c 25 Nov 2004 22:31:08 - 2.33 +++ tree-into-ssa.c 29 Nov 2004 13:40:34 - @@ -614,7 +614,7 @@ insert_phi_nodes (bitmap *dfs, bitmap na /* Vector WORK_STACK is a stack of CFG blocks. Each block that contains an assignment or PHI node will be pushed to this stack. */ - work_stack = VEC_alloc (basic_block, last_basic_block); + work_stack = VEC_alloc (basic_block, n_basic_blocks); /* Iterate over all variables in VARS_TO_RENAME. For each variable, add to the work list all the blocks that have a definition for the But that is not sufficient. We are overflowing work_stack, when we really shouldn't. I'm looking into this now. Diego. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18712
[Bug tree-optimization/18712] [4.0 Regression] ICE: vector VEC(basic_block) push domain error, in insert_phi_nodes_for at tree-into-ssa.c:1049
-- What|Removed |Added AssignedTo|unassigned at gcc dot gnu |dnovillo at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18712
[Bug tree-optimization/18712] [4.0 Regression] ICE: vector VEC(basic_block) push domain error, in insert_phi_nodes_for at tree-into-ssa.c:1049
--- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-29 16:24 --- *** Bug 18719 has been marked as a duplicate of this bug. *** -- What|Removed |Added CC||micis at gmx dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18712
[Bug tree-optimization/18712] [4.0 Regression] ICE: vector VEC(basic_block) push domain error, in insert_phi_nodes_for at tree-into-ssa.c:1049
--- Additional Comments From dnovillo at gcc dot gnu dot org 2004-11-29 19:20 --- (In reply to comment #5) But that is not sufficient. We are overflowing work_stack, when we really shouldn't. I'm looking into this now. I was wrong. It is indeed possible for WORK_STACK to have more than N_BASIC_BLOCKS used. For each block B with a definition for VAR, we add blocks in B's DFS to the stack. Steven's patch is almost right, but we also need to pass WORK_STACK by reference. Patch in testing. Diego. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18712
[Bug tree-optimization/18712] [4.0 Regression] ICE: vector VEC(basic_block) push domain error, in insert_phi_nodes_for at tree-into-ssa.c:1049
--- Additional Comments From dnovillo at gcc dot gnu dot org 2004-11-29 20:15 --- Fix: http://gcc.gnu.org/ml/gcc-patches/2004-11/msg02593.html -- What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18712