From 0138492e7bdbb4949c940a501415b7bbf5ffb9b4 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 17 Aug 2018 09:26:53 +0000 Subject: [PATCH] re PR tree-optimization/86841 (ICE in gcc/gcc/tree-vrp.c:1325 with graphite) 2018-08-17 Richard Biener PR tree-optimization/86841 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi. From-SVN: r263615 --- gcc/ChangeLog | 5 +++++ gcc/wide-int-range.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 265fa237541..db625ddd4f0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-08-17 Richard Biener + + PR tree-optimization/86841 + * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi. + 2018-08-17 Martin Liska * common.opt: Remove Warn, Init and Report for options with diff --git a/gcc/wide-int-range.cc b/gcc/wide-int-range.cc index 3491d89664d..726ec63b3a6 100644 --- a/gcc/wide-int-range.cc +++ b/gcc/wide-int-range.cc @@ -323,7 +323,7 @@ wide_int_range_lshift (wide_int &res_lb, wide_int &res_ub, /* Transform left shifts by constants into multiplies. */ if (wi::eq_p (vr1_lb, vr1_ub)) { - int shift = wi::extract_uhwi (vr1_ub, 0, vr1_ub.get_precision ()); + unsigned shift = vr1_ub.to_uhwi (); wide_int tmp = wi::set_bit_in_zero (shift, prec); return wide_int_range_multiplicative_op (res_lb, res_ub, MULT_EXPR, sign, prec, -- 2.30.2