public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.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: Wed, 07 Jul 2021 21:36:04 +0000 [thread overview] Message-ID: <bug-97566-4-HFJjxaXT36@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-97566-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97566 --- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Jason Merrill <jason@gcc.gnu.org>: https://gcc.gnu.org/g:38fed4dfa25ac4894546f0589340ebfc5eef3bee commit r11-8704-g38fed4dfa25ac4894546f0589340ebfc5eef3bee Author: Jason Merrill <jason@redhat.com> Date: Thu Jun 24 17:32:02 2021 -0400 c++: constexpr aggr init of empty class [PR101040] This is basically the aggregate initializer version of PR97566; as in that bug, we are trying to initialize empty field 'obj' in 'single' when there's no CONSTRUCTOR entry for the 'single' base class subobject of 'derived'. As with that bug, the fix is to stop trying to add entries for empty fields, this time in cxx_eval_bare_aggregate. The change to the other function isn't necessary for this version of the patch, but seems worthwhile for robustness anyway. PR c++/101040 PR c++/97566 gcc/cp/ChangeLog: * class.c (is_empty_field): Handle null argument. * constexpr.c (cxx_eval_bare_aggregate): Discard initializer for empty field. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/no_unique_address13.C: New test.
next prev parent reply other threads:[~2021-07-07 21:36 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-25 3:37 [Bug c++/97566] New: " natattak at gmail dot com 2020-10-29 16:34 ` [Bug c++/97566] " redi at gcc dot gnu.org 2021-01-26 1:14 ` jason at gcc dot gnu.org 2021-01-26 20:01 ` cvs-commit at gcc dot gnu.org 2021-01-26 20:11 ` jason at gcc dot gnu.org 2021-02-09 1:52 ` cvs-commit at gcc dot gnu.org 2021-06-26 4:13 ` cvs-commit at gcc dot gnu.org 2021-07-07 21:36 ` cvs-commit at gcc dot gnu.org [this message] 2021-08-20 14:48 ` soap at gentoo dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-97566-4-HFJjxaXT36@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).