This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]