public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56564] New: [4.7 Regression] movdqa on possibly-8-byte-aligned struct with -O3
@ 2013-03-07 16:24 lukeocamden at gmail dot com
  2013-03-07 16:27 ` [Bug c++/56564] " lukeocamden at gmail dot com
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: lukeocamden at gmail dot com @ 2013-03-07 16:24 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56564
           Summary: [4.7 Regression] movdqa on possibly-8-byte-aligned
                    struct with -O3
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: lukeocamden@gmail.com


#include <boost/exception_ptr.hpp>

struct foo { };

int main()
{
  boost::copy_exception(foo());
}

Compiling the above with -O3 results in the following instruction being
emitted:

movdqa  %xmm0,
_ZZN5boost16exception_detail27get_static_exception_objectINS0_10bad_alloc_EEENS_13exception_ptrEvE2ep(%rip)

But that symbol need not be 16-byte aligned (it's a boost::exception_ptr, which
contains a boost::shared_ptr, which is just a pair of pointers).

This crashes if
_ZZN5boost16exception_detail27get_static_exception_objectINS0_10bad_alloc_EEENS_13exception_ptrEvE2ep
comes from another object file where it is declared with 8-byte alignment.

Possible duplicate of 54167? Works fine with 4.6.2

Preprocessed source is attached.


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2013-06-12  6:50 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-07 16:24 [Bug c++/56564] New: [4.7 Regression] movdqa on possibly-8-byte-aligned struct with -O3 lukeocamden at gmail dot com
2013-03-07 16:27 ` [Bug c++/56564] " lukeocamden at gmail dot com
2013-03-08 10:01 ` [Bug c++/56564] " rguenth at gcc dot gnu.org
2013-03-08 10:33 ` lukeocamden at gmail dot com
2013-03-08 10:47 ` lukeocamden at gmail dot com
2013-03-08 11:09 ` lukeocamden at gmail dot com
2013-03-08 11:21 ` jakub at gcc dot gnu.org
2013-03-08 11:27 ` [Bug target/56564] " rguenth at gcc dot gnu.org
2013-03-08 11:37 ` jakub at gcc dot gnu.org
2013-03-08 12:38 ` jakub at gcc dot gnu.org
2013-04-08 15:22 ` hubicka at gcc dot gnu.org
2013-05-25 18:21 ` jakub at gcc dot gnu.org
2013-06-07 14:01 ` jakub at gcc dot gnu.org
2013-06-10 15:52 ` jakub at gcc dot gnu.org
2013-06-11  6:17 ` jakub at gcc dot gnu.org
2013-06-11  9:16 ` dominiq at lps dot ens.fr
2013-06-11  9:27 ` jakub at gcc dot gnu.org
2013-06-11 15:11 ` dominiq at lps dot ens.fr
2013-06-11 15:27 ` jakub at gcc dot gnu.org
2013-06-12  6:50 ` jakub at gcc dot gnu.org

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