https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119709
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I should mention this is a known issue and not one easily solvable. bug 60749 describes the internals of GCC on what is going wrong which is why it might not read as a duplicate. But this is the jist: In particular, if any narrow memory location is read (...), the zero/sign extension can't be combined.