This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/48377] [4.6 regression] miscompilation at -O3
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 6 Apr 2011 07:02:02 +0000
- Subject: [Bug middle-end/48377] [4.6 regression] miscompilation at -O3
- Auto-submitted: auto-generated
- References: <bug-48377-4@http.gcc.gnu.org/bugzilla/>
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.