This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/53245] [4.8 Regression] ice in expand_case
- From: "steven at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 07 May 2012 13:57:49 +0000
- Subject: [Bug middle-end/53245] [4.8 Regression] ice in expand_case
- Auto-submitted: auto-generated
- References: <bug-53245-4@http.gcc.gnu.org/bugzilla/>
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;
}
}