[Bug target/58735] X86_64 sign extend on unsigned values
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Oct 15 09:45:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58735
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
There is nothing wrong about it, just your expectations.
sval << scnt
is due to C/C++ integral promotions performed as ((int) sval) << scnt,
depending on the exact standard for 32-bit int is either undefined behavior or
-1442840576
and that is then extended to 64-bit type.
More information about the Gcc-bugs
mailing list