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++/104565] [10/11 Regression] constexpr template goes wrong with class and call to constexpr method
Date: Thu, 07 Apr 2022 19:19:28 +0000	[thread overview]
Message-ID: <bug-104565-4-GLPJ8PVpv2@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104565-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:

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

commit r11-9795-gc0f38a14c8e9daf4c3f96fe9de4e9785616d5912
Author: Patrick Palka <ppalka@redhat.com>
Date:   Thu Feb 17 08:35:23 2022 -0500

    c++: double non-dep folding from finish_compound_literal [PR104565]

    In finish_compound_literal, we perform non-dependent expr folding before
    the call to check_narrowing ever since r9-5973.  But ever since r10-7096,
    check_narrowing also performs non-dependent expr folding of its own.
    This double folding means tsubst will see non-templated trees during the
    second folding, which causes a spurious error in the below testcase.

    This patch removes the former folding operation; it seems obviated by
    the latter one.

            PR c++/104565

    gcc/cp/ChangeLog:

            * semantics.c (finish_compound_literal): Don't perform
            non-dependent expr folding before calling check_narrowing.

    gcc/testsuite/ChangeLog:

            * g++.dg/template/non-dependent22.C: New test.

    (cherry picked from commit 6bbd8afee0036c274f5ebb5b48d6fdc2091bd046)

  parent reply	other threads:[~2022-04-07 19:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-16 12:12 [Bug c++/104565] New: One too many `this`es in parsing? ted at lyncon dot se
2022-02-16 17:25 ` [Bug c++/104565] [10/11/12 Regression] " pinskia at gcc dot gnu.org
2022-02-16 17:27 ` [Bug c++/104565] [10/11/12 Regression] constexpr template goes wrong with class and call to constexpr method pinskia at gcc dot gnu.org
2022-02-16 20:06 ` ppalka at gcc dot gnu.org
2022-02-17 10:04 ` rguenth at gcc dot gnu.org
2022-02-17 13:35 ` cvs-commit at gcc dot gnu.org
2022-02-17 13:36 ` [Bug c++/104565] [10/11 " ppalka at gcc dot gnu.org
2022-03-18 12:16 ` ppalka at gcc dot gnu.org
2022-04-07 19:19 ` cvs-commit at gcc dot gnu.org [this message]
2022-05-09 23:32 ` [Bug c++/104565] [10 " cvs-commit at gcc dot gnu.org
2022-05-09 23:35 ` ppalka 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-104565-4-GLPJ8PVpv2@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).