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: unassig...@gcc.gnu.org ReportedBy: lukeocam...@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.