aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorSteven Bosscher <steven@gcc.gnu.org>2012-05-07 14:40:33 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2012-05-07 14:40:33 +0000
commit5be1632b7deef653e188e11a930c938c7d3ce6e6 (patch)
tree0287594a99680ae4fc31b3c9c0ae79b03d370930 /gcc/gimplify.c
parent60197adbfd6b91e997c61ead24e925f65be3fcbe (diff)
downloadgcc-5be1632b7deef653e188e11a930c938c7d3ce6e6.zip
gcc-5be1632b7deef653e188e11a930c938c7d3ce6e6.tar.gz
gcc-5be1632b7deef653e188e11a930c938c7d3ce6e6.tar.bz2
re PR middle-end/53245 (ice in expand_case)
PR middle-end/53245 * gimplify.c (preprocess_case_label_vec_for_gimple): If low or high is folded to a type boundary value, verify that the resulting case label is still a care range. From-SVN: r187248
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index d7cbc24..74d7895 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -1658,6 +1658,10 @@ preprocess_case_label_vec_for_gimple (VEC(tree,heap) *labels,
&& 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;
}
}