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++/115645] [12/13/14 Regression] new S[1][1]() requires non-explicit default ctor since r11-3092
Date: Wed, 31 Jul 2024 12:50:13 +0000	[thread overview]
Message-ID: <bug-115645-4-xwxBSu48u8@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-115645-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115645

--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:

https://gcc.gnu.org/g:bbc9c0423ca754e8e6ff80e08948ff52986337a0

commit r15-2435-gbbc9c0423ca754e8e6ff80e08948ff52986337a0
Author: Marek Polacek <polacek@redhat.com>
Date:   Wed Jul 17 15:44:26 2024 -0400

    c++: array new with value-initialization, again [PR115645]

    Unfortunately, my r15-1946 fix broke the attached testcase; the
    constexpr evaluation reported an error about not being able to
    evaluate the code emitted by build_vec_init.  Jason figured out
    it's because we were wrongly setting try_const to false, where
    in fact it should have been true.  Value-initialization of scalars
    is constexpr, so we should check that alongside of
    type_has_constexpr_default_constructor.

            PR c++/115645

    gcc/cp/ChangeLog:

            * init.cc (build_vec_init): When initializing a scalar type, try to
            create a constant initializer.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/constexpr-new23.C: New test.

      parent reply	other threads:[~2024-07-31 12:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-25 13:02 [Bug c++/115645] New: [11/12/13/14/15 " redi at gcc dot gnu.org
2024-06-25 13:06 ` [Bug c++/115645] " redi at gcc dot gnu.org
2024-06-25 13:07 ` redi at gcc dot gnu.org
2024-06-25 14:14 ` rguenth at gcc dot gnu.org
2024-06-25 14:58 ` mpolacek at gcc dot gnu.org
2024-07-10 16:36 ` cvs-commit at gcc dot gnu.org
2024-07-10 16:38 ` [Bug c++/115645] [11/12/13/14 " mpolacek at gcc dot gnu.org
2024-07-11 22:34 ` redi at gcc dot gnu.org
2024-07-11 22:37 ` mpolacek at gcc dot gnu.org
2024-07-18 10:37 ` rguenth at gcc dot gnu.org
2024-07-19 13:25 ` [Bug c++/115645] [12/13/14 " rguenth at gcc dot gnu.org
2024-07-31 12:50 ` cvs-commit at gcc dot gnu.org [this message]

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-115645-4-xwxBSu48u8@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: link
Be 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).