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++/105064] [10/11 Regression] requires crashes gcc
Date: Thu, 07 Apr 2022 19:19:33 +0000	[thread overview]
Message-ID: <bug-105064-4-w9msbCmhAL@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105064-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #13 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:214330a15cd7fd52e574023152f1321c6d329e82

commit r11-9796-g214330a15cd7fd52e574023152f1321c6d329e82
Author: Patrick Palka <ppalka@redhat.com>
Date:   Mon Mar 28 14:15:16 2022 -0400

    c++: constrained template friend matching ICE [PR105064]

    Here during declaration matching for the two constrained template
    friends, we crash from maybe_substitute_reqs_for because the second
    friend doesn't yet have DECL_TEMPLATE_INFO set (we're being called
    indirectly from push_template_decl).

    As far as I can tell, this situation happens only when declaring a
    constrained template friend within a non-template class (as in the
    testcase), in which case the substitution would be a no-op anyway.
    So this patch rearranges maybe_substitute_reqs_for to gracefully
    handle missing DECL_TEMPLATE_INFO by just skipping the substitution.

            PR c++/105064

    gcc/cp/ChangeLog:

            * constraint.cc (maybe_substitute_reqs_for): Don't assume
            DECL_TEMPLATE_INFO is available.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/concepts-friend9.C: New test.

    (cherry picked from commit ecb4882e362e80a1bf172453ac9b366edbb4e89c)

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

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-26 17:21 [Bug c++/105064] New: " janezz55 at gmail dot com
2022-03-26 20:40 ` [Bug c++/105064] " redi at gcc dot gnu.org
2022-03-27 11:43 ` janezz55 at gmail dot com
2022-03-27 13:00 ` redi at gcc dot gnu.org
2022-03-27 13:02 ` redi at gcc dot gnu.org
2022-03-27 18:01 ` janezz55 at gmail dot com
2022-03-27 18:05 ` janezz55 at gmail dot com
2022-03-27 18:29 ` janezz55 at gmail dot com
2022-03-27 18:39 ` janezz55 at gmail dot com
2022-03-27 19:16 ` janezz55 at gmail dot com
2022-03-27 22:19 ` [Bug c++/105064] [10/11/12 Regression] " redi at gcc dot gnu.org
2022-03-28  7:30 ` rguenth at gcc dot gnu.org
2022-03-28 13:27 ` ppalka at gcc dot gnu.org
2022-03-28 18:17 ` cvs-commit at gcc dot gnu.org
2022-03-28 18:19 ` [Bug c++/105064] [10/11 " ppalka at gcc dot gnu.org
2022-04-07 19:19 ` cvs-commit at gcc dot gnu.org [this message]
2022-05-04  0:24 ` [Bug c++/105064] [10 " 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-105064-4-w9msbCmhAL@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).