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++/96994] Missing code from consteval constructor initializing const variable Date: Mon, 05 Oct 2020 08:25:00 +0000 [thread overview] Message-ID: <bug-96994-4-wXkfWN9OwS@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-96994-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96994 --- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:2513dad670c00dd9db3a85be348f6f4020b18b81 commit r10-8853-g2513dad670c00dd9db3a85be348f6f4020b18b81 Author: Jakub Jelinek <jakub@redhat.com> Date: Thu Oct 1 11:18:35 2020 +0200 c++: Fix up default initialization with consteval default ctor [PR96994] > > The following testcase is miscompiled (in particular the a and i > > initialization). The problem is that build_special_member_call due to > > the immediate constructors (but not evaluated in constant expression mode) > > doesn't create a CALL_EXPR, but returns a TARGET_EXPR with CONSTRUCTOR > > as the initializer for it, > > That seems like the bug; at the end of build_over_call, after you > > > call = cxx_constant_value (call, obj_arg); > > You need to build an INIT_EXPR if obj_arg isn't a dummy. That works. obj_arg is NULL if it is a dummy from the earlier code. 2020-10-01 Jakub Jelinek <jakub@redhat.com> PR c++/96994 * call.c (build_over_call): If obj_arg is non-NULL, return INIT_EXPR setting obj_arg to call. * g++.dg/cpp2a/consteval18.C: New test. (cherry picked from commit 56da736cc6ced0f1c339744321a14ae569db8606)
next prev parent reply other threads:[~2020-10-05 8:25 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-09 11:27 [Bug c++/96994] New: " sbergman at redhat dot com 2020-09-09 22:06 ` [Bug c++/96994] " mpolacek at gcc dot gnu.org 2020-09-10 17:52 ` jakub at gcc dot gnu.org 2020-09-10 17:55 ` jakub at gcc dot gnu.org 2020-09-10 18:00 ` mpolacek at gcc dot gnu.org 2020-09-10 18:10 ` jakub at gcc dot gnu.org 2020-09-10 18:11 ` jakub at gcc dot gnu.org 2020-09-14 13:11 ` jakub at gcc dot gnu.org 2020-09-21 20:08 ` mpolacek at gcc dot gnu.org 2020-10-01 9:19 ` cvs-commit at gcc dot gnu.org 2020-10-05 8:25 ` cvs-commit at gcc dot gnu.org [this message] 2021-04-20 15:12 ` jakub at gcc dot gnu.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-96994-4-wXkfWN9OwS@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).