public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/58772] __attribute__((aligned(16))) and nested classes cause -ftree-vectorize to generate segfaulting code
Date: Fri, 18 Oct 2013 08:30:00 -0000	[thread overview]
Message-ID: <bug-58772-4-1m5c5OSnEX@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-58772-4@http.gcc.gnu.org/bugzilla/>

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.


  reply	other threads:[~2013-10-18  8:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-17 23:33 [Bug c++/58772] New: " roothorick at gmail dot com
2013-10-18  8:30 ` rguenth at gcc dot gnu.org [this message]
2013-10-18 15:41 ` [Bug c++/58772] " roothorick at gmail dot com
2013-10-21  8:52 ` rguenth at gcc dot gnu.org
2013-10-21  9:04 ` paolo.carlini at oracle dot com
2013-10-21  9:35 ` burnus at gcc dot gnu.org
2013-10-21  9:50   ` pinskia
2013-10-21 10:07 ` burnus at gcc dot gnu.org
2013-10-22  9:50 ` paolo.carlini at oracle dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-58772-4-1m5c5OSnEX@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).