http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48377
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |RESOLVED Resolution| |INVALID --- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-04-06 07:01:59 UTC --- Yeah, and with -O3 you are requesting vectorization. When that loop gets vectorized, gcc counts on that you don't lie about alignment. You should be using either typedef uint32_t unaligned_uint32 __attribute__((__aligned__ (1), __may_alias__))); and use that type for wordp, or just use may_alias attribute and first do a few byte cycles to align the pointer, then do the main cycle, then do any remaining bytes.