http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49264
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-06-03 06:50:50 UTC --- Reduced testcase: // PR c++/49264 // { dg-do compile } // { dg-options "-O2" } struct B { }; struct A { char a[sizeof (B) + 1]; } a; static inline void foo (const B &b) { __builtin_memcpy (&a, &b, sizeof (b)); } void bar () { B c; foo (c); }