[Bug middle-end/53245] [4.8 Regression] ice in expand_case
steven at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon May 7 13:59:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53245
--- Comment #5 from Steven Bosscher <steven at gcc dot gnu.org> 2012-05-07 13:57:49 UTC ---
Duh!
Index: gimplify.c
===================================================================
--- gimplify.c (revision 187219)
+++ gimplify.c (working copy)
@@ -1658,6 +1658,10 @@
&& tree_int_cst_compare (high, max_value) > 0)
high = max_value;
high = fold_convert (index_type, high);
+
+ /* We may have folded a case range to a one-value case. */
+ if (tree_int_cst_equal (low, high))
+ high = NULL_TREE;
}
}
More information about the Gcc-bugs
mailing list