[Bug c++/56392] Crash while filling an odd-pitch 16bpp image with auto-vectorization enabled on x86_64 Linux platform

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 19 12:25:00 GMT 2013


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 ...



More information about the Gcc-bugs mailing list