This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/56392] Crash while filling an odd-pitch 16bpp image with auto-vectorization enabled on x86_64 Linux platform
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 Feb 2013 12:25:04 +0000
- Subject: [Bug c++/56392] Crash while filling an odd-pitch 16bpp image with auto-vectorization enabled on x86_64 Linux platform
- Auto-submitted: auto-generated
- References: <bug-56392-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56392
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2013-02-19 12:25:04 UTC ---
(In reply to comment #2)
> (In reply to comment #1)
> > You are dereferencing a pointer to uint16_t that is not sufficiently aligned
> > for that type. The C standard prohibits this, resulting in undefined behavior.
>
> Thanks for your answer, but should not a warning be generated by gcc in such a
> circumstance?
It is, with -Wcast-align, but only on targets where unaligned accesses are
not supported. That vectorization ends up turing x86_64 into such one isn't
considered by the warning code ...