This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/86763] [7/8/9 Regression] Wrong code comparing member of copy of a 237 byte object with nontrivial default constructor on x86-64 arch
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 02 Aug 2018 08:24:12 +0000
- Subject: [Bug c++/86763] [7/8/9 Regression] Wrong code comparing member of copy of a 237 byte object with nontrivial default constructor on x86-64 arch
- Auto-submitted: auto-generated
- References: <bug-86763-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86763
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
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. */