This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/38661] [4.4 Regression] ICE: vector VEC(constructor_elt,base) push domain error, in build_constructors at tree-switch-conversion.c:450
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Dec 2008 19:41:28 -0000
- Subject: [Bug tree-optimization/38661] [4.4 Regression] ICE: vector VEC(constructor_elt,base) push domain error, in build_constructors at tree-switch-conversion.c:450
- References: <bug-38661-16508@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pinskia at gcc dot gnu dot org 2008-12-29 19:41 -------
I think I have a simple fix:
Index: ../../gcc/tree-switch-conversion.c
===================================================================
--- ../../gcc/tree-switch-conversion.c (revision 142944)
+++ ../../gcc/tree-switch-conversion.c (working copy)
@@ -440,9 +440,10 @@ build_constructors (gimple swtch)
{
gimple phi = gsi_stmt (gsi);
tree val = PHI_ARG_DEF_FROM_EDGE (phi, e);
+ tree low = CASE_LOW (cs);
pos = CASE_LOW (cs);
- while (!tree_int_cst_lt (high, pos))
+ do
{
constructor_elt *elt;
@@ -452,7 +453,7 @@ build_constructors (gimple swtch)
elt->value = val;
pos = int_const_binop (PLUS_EXPR, pos, integer_one_node, 0);
- }
+ } while (!tree_int_cst_lt (high, pos) && tree_int_cst_lt (low,
pos));
j++;
}
}
--
pinskia at gcc dot gnu dot org changed:
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=38661