https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109519
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Are you 100% sure there is no aliasing issues here? Especially with code like: uint16_t *out_ui16 = (uint16_t*) &out_b[((7 - kk) * nbyte + ii) / 8]; *out_ui16 = ((uint16_t*)out)[kk];