[Bug c/78135] In an unsigned long (64 bit) 1<<31 gives rubbish

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Oct 27 16:39:00 GMT 2016


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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
wk = 0x100000000 << j;

That is still int << j

Try changing it to be the following:
wk = 0x100000000ull << j;


More information about the Gcc-bugs mailing list