This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/81931] [8 regression] r251260 breaks many tests on powerpc64


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).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]