From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 228F33939C26; Tue, 9 Feb 2021 01:52:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 228F33939C26 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/97566] [[no_unique_address]] causes miscompiles when mixed with EBO in constexpr context Date: Tue, 09 Feb 2021 01:52:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Feb 2021 01:52:35 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97566 --- Comment #4 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:a8dd2b3e96590ceccead63d28fc91c956a5f1a73 commit r11-7141-ga8dd2b3e96590ceccead63d28fc91c956a5f1a73 Author: Jason Merrill Date: Mon Feb 8 15:56:11 2021 -0500 c++: constexpr, union, and no_unique_address [PR98994] My second patch for 97566 omits nested CONSTRUCTORs for empty fields, b= ut we do want them for empty union members. gcc/cp/ChangeLog: PR c++/98994 PR c++/97566 * constexpr.c (cxx_eval_store_expression): Only skip empty fiel= ds in RECORD_TYPE. gcc/testsuite/ChangeLog: PR c++/98994 * g++.dg/cpp2a/no_unique_address12.C: New test.=