https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86841

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
It's a problem with the VRP machinery assuming shift counts are never bigger
than 64bits...

  /* 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 ());
      wide_int tmp = wi::set_bit_in_zero (shift, prec);
      return wide_int_range_multiplicative_op (res_lb, res_ub,
                                               MULT_EXPR, sign, prec,
                                               vr0_lb, vr0_ub, tmp, tmp,
                                               overflow_undefined,
                                               /*overflow_wraps=*/true);

this should use wi::to_uhwi.

Reply via email to