https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80689
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Target| |x86_64-*-* --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- That you use noinline tells that glibc memcpy has the very same issue. Note that similarly having bytes/shorts in the structure and using longs or ints to implement inlined memcpy has the same issue. So I don't see how to easily fix this, or rather I don't think we can fix it at all apart from the case where we can see both the struct copy and previous stores to the source (thus when you enable inlining).