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++/99803] [9/10/11 Regression] ICE: in make_typename_type, at cp/decl.c:4057
Date: Fri, 16 Apr 2021 15:12:08 +0000	[thread overview]
Message-ID: <bug-99803-4-e33RL2TAdv@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99803-4@http.gcc.gnu.org/bugzilla/>

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

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

https://gcc.gnu.org/g:70f2bff43aadd2fcc0595bf9f4bab72647529655

commit r11-8220-g70f2bff43aadd2fcc0595bf9f4bab72647529655
Author: Marek Polacek <polacek@redhat.com>
Date:   Wed Apr 14 17:57:15 2021 -0400

    c++: ICE with bogus late return type [PR99803]

    Here we ICE when compiling this code in C++20, because we're trying to
    slam a 'typename' after the ->.  The cp_parser_template_id call just
    before the spot I'm changing parsed A::template A<int> as a BASELINK
    that contains a constructor, but make_typename_type crashes on that.

    This patch makes make_typename_type more robust instead of checking
    for is_overloaded_fn prior calling it.

    gcc/cp/ChangeLog:

            PR c++/99803
            * decl.c (make_typename_type): Give an error and return when
            name is is_overloaded_fn.
            * parser.c (cp_parser_class_name): Don't check is_overloaded_fn
            before calling make_typename_type.

    gcc/testsuite/ChangeLog:

            PR c++/99803
            * g++.dg/cpp2a/typename14.C: Don't expect particular error
            messages.
            * g++.dg/cpp2a/typename19.C: New test.

  parent reply	other threads:[~2021-04-16 15:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-28 17:14 [Bug c++/99803] New: internal compiler error: " hewillk at gmail dot com
2021-03-29 17:50 ` [Bug c++/99803] [9/10/11 Regression] ICE: " mpolacek at gcc dot gnu.org
2021-04-16 15:12 ` cvs-commit at gcc dot gnu.org [this message]
2021-04-16 16:23 ` 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-99803-4-e33RL2TAdv@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).