[Bug tree-optimization/105532] UBSAN: gcc/hwint.h:293:61: runtime error: shift exponent 64 is too large for 64-bit type 'long unsigned int'
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 2 01:42:08 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105532
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Hmm, so prec is 0 here.
gcc_checking_assert (prec < HOST_BITS_PER_WIDE_INT);
int shift = HOST_BITS_PER_WIDE_INT - prec;
return ((HOST_WIDE_INT) ((unsigned HOST_WIDE_INT) src << shift)) >>
shift;
That is the only way to get a shift of 64.
More information about the Gcc-bugs
mailing list