https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109750
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- ((UI64)source.sH.lower) The question is source.sH.lower promoted to int rather than the underlying type. Note clang has the same behavior as GCC here even. So I am thinking this is a bug in MSVC rather than GCC ... (or some implemented defined behavior and both are correct).