This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/56564] New: [4.7 Regression] movdqa on possibly-8-byte-aligned struct with -O3
- From: "lukeocamden at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 07 Mar 2013 16:23:22 +0000
- Subject: [Bug c++/56564] New: [4.7 Regression] movdqa on possibly-8-byte-aligned struct with -O3
- Auto-submitted: auto-generated
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.