public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106259] [10/11/12/13 Regression] ICE in diag_mismatched_tags, at cp/parser.cc:33896 Date: Wed, 01 Mar 2023 17:05:45 +0000 [thread overview] Message-ID: <bug-106259-4-S24S3tyf62@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106259-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106259 Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org --- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Ah, this does what I want: --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -34473,6 +34473,12 @@ class_decl_loc_t::diag_mismatched_tags (tree type_decl) be (and inevitably is) at index zero. */ tree spec = specialization_of (type); cdlguide = class2loc.get (spec); + if (!cdlguide) + { + spec = most_general_template (spec); + spec = TYPE_MAIN_DECL (TREE_TYPE (spec)); + cdlguide = class2loc.get (spec); + } gcc_assert (cdlguide != NULL); } else
next prev parent reply other threads:[~2023-03-01 17:05 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-11 18:57 [Bug c++/106259] New: " gscfq@t-online.de 2022-07-11 19:23 ` [Bug c++/106259] [10/11/12/13 Regression] " mpolacek at gcc dot gnu.org 2022-07-11 19:29 ` mpolacek at gcc dot gnu.org 2023-02-28 20:43 ` mpolacek at gcc dot gnu.org 2023-03-01 16:12 ` mpolacek at gcc dot gnu.org 2023-03-01 17:05 ` mpolacek at gcc dot gnu.org [this message] 2023-03-02 16:02 ` cvs-commit at gcc dot gnu.org 2023-03-02 16:06 ` [Bug c++/106259] [10/11/12 " mpolacek at gcc dot gnu.org 2023-03-04 17:52 ` cvs-commit at gcc dot gnu.org 2023-03-04 18:16 ` [Bug c++/106259] [10/11 " mpolacek 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-106259-4-S24S3tyf62@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).