https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82939
--- Comment #16 from Eric Gallager <egallager at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #15) > Full testcase suitable for configure: > extern "C" void abort (); > struct S { ~S () { if (x) abort (); }; int x, y, z; }; > void foo (S *p) { *p = S (); } > int main () { S s; s.x = 1; s.y = 2; s.z = 3; foo (&s); if (s.x != 0 || s.y > != 0 || s.z != 0) abort (); } > Given how many places r249234 changed, adding workarounds for the PR33916 > GCC 4.2.[0-3] bug might be too pervasive. All 4.2.* compilers from 20061017 > to 20080212 are likely broken, unless patched. I can confirm that this aborts for me when compiled with g++ 4.2.1 with -O2.