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

--- Comment #8 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
FWIW, the reason a cross x86-64 to ppc64 doesn't exhibit the problem may be
because 

wi::shwi (-1, precision) calls sext_hwi() which eventually shifts left by 64
bits:

      int shift = HOST_BITS_PER_WIDE_INT - prec;
      return ((HOST_WIDE_INT) ((unsigned HOST_WIDE_INT) src << shift)) >>
shift;

AFAIK, shifting left by the entire width of a type is undefined, and I am
definitely seeing the above return instruction yield two different things on
x86-64 (0) than on ppc64 native (-1).

Reply via email to