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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amacleod at redhat dot com

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The problem is in
271       if (relation_equiv_p (rel) && lh == rh)
We see
  # RANGE [irange] int [0, 1] NONZERO 0x1
  # iftmp.0_6 = PHI <_10(3), 0(2)>
  # RANGE [irange] long int [0, 1] NONZERO 0x1
  _3 = (long int) iftmp.0_6;
  # RANGE [irange] unsigned int [0, 1] NONZERO 0x1
  _4 = (unsigned int) iftmp.0_6;
  # RANGE [irange] long int [-INF, +INF] NONZERO 0x3
  _5 = _3 << _4;
so lhs and rhs indeed have the same range, but unlike most binary operations,
shifts/rotates have the same type between lhs and rhs1, but rhs2 can have
different type.
So, the lh == rh comparison ICEs because the wide_ints have different precision
(but same values).

Reply via email to