https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120904
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- So I think clang might be producing wrong code. There should be still a check the size_ does not have the sign bit set as i dont see how clang would know that. I think the code itself needs that check too. So the needs that check in both begin and end .