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++/58772] __attribute__((aligned(16))) and nested classes cause -ftree-vectorize to generate segfaulting code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58772

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-10-18
                 CC|                            |paolo.carlini at oracle dot com
     Ever confirmed|0                           |1
           Severity|normal                      |enhancement

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  The vectorizer thinks that 'subs' is 16-byte aligned and uses
movaps for the vectorized store.  Actor is layed out correctly (alignment
16 and Sub at a 16 byte alignment boundary), but 'new' returns an 8-byte
aligned pointer.  ISTR it is a known issue that using 'new' with custom
aligned classes doesn't work reliably - the same is true for C code where
using malloc to allocate the class would be wrong, you'd have to use
posix_memalign or a similar function.

Thus, this is an invalid report (but I suppose we should be easily able
to warn in case new is applied to a type with user-specified alignment?).

Keeping as diagnostic enhancement.


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