[Bug c++/86763] [7/8 Regression] Wrong code comparing member of copy of a 237 byte object with nontrivial default constructor on x86-64 arch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86763 --- Comment #13 from Richard Biener --- Author: rguenth Date: Fri Aug 17 11:51:48 2018 New Revision: 263617 URL: https://gcc.gnu.org/viewcvs?rev=263617=gcc=rev Log: 2018-08-17 Richard Biener Backport from mainline 2018-08-02 Richard Biener PR c++/86763 * class.c (layout_class_type): Copy TYPE_TYPELESS_STORAGE to the CLASSTYPE_AS_BASE. * g++.dg/torture/pr86763.C: New testcase. Added: branches/gcc-8-branch/gcc/testsuite/g++.dg/torture/pr86763.C Modified: branches/gcc-8-branch/gcc/cp/ChangeLog branches/gcc-8-branch/gcc/cp/class.c branches/gcc-8-branch/gcc/testsuite/ChangeLog
[Bug c++/86763] [7/8 Regression] Wrong code comparing member of copy of a 237 byte object with nontrivial default constructor on x86-64 arch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86763 --- Comment #12 from Paul Brannan --- (In reply to Richard Biener from comment #9) > The following seems to work, will test. > > Index: gcc/cp/class.c > === > --- gcc/cp/class.c (revision 263209) > +++ gcc/cp/class.c (working copy) > @@ -6243,6 +6243,7 @@ layout_class_type (tree t, tree *virtual > bitsize_int (BITS_PER_UNIT))); >SET_TYPE_ALIGN (base_t, rli->record_align); >TYPE_USER_ALIGN (base_t) = TYPE_USER_ALIGN (t); > + TYPE_TYPELESS_STORAGE (base_t) = TYPE_TYPELESS_STORAGE (t); > >/* Copy the non-static data members of T. This will include its > direct non-virtual bases & vtable. */ This patch fixes the failure in my original (non-reduced test case).
[Bug c++/86763] [7/8 Regression] Wrong code comparing member of copy of a 237 byte object with nontrivial default constructor on x86-64 arch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86763 Richard Biener changed: What|Removed |Added Known to work||9.0 Summary|[7/8/9 Regression] Wrong|[7/8 Regression] Wrong code |code comparing member of|comparing member of copy of |copy of a 237 byte object |a 237 byte object with |with nontrivial default |nontrivial default |constructor on x86-64 arch |constructor on x86-64 arch --- Comment #11 from Richard Biener --- Fixed on trunk sofar.