https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93031
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |WONTFIX --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I think it is wrong to assume that. In fact it will make the code generation worse. NOTE on x86_64, some instructions (SSE load/store ones) only handle aligned load/stores. So there is the underlying ISA for x86_64 does enforce alignment. That is where the blog is talking about really. it just happens the GPR loads don't enforce alignment. The C standard is clear here. What you want really is the aligned attribute applied to all types. This is not going to be supported really as it is not useful in real code and will cause most code to be worse off. >GCC assumes that all pointers are aligned even when the target ISA really has >no such restriction Because the C standard says that is way pointers are designed. Writing code in C means understand the standard requirements including alignment, aliasing, etc.