public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "reichelt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/101898] New: [concepts] ICE with auto in concept definition
Date: Fri, 13 Aug 2021 12:02:29 +0000	[thread overview]
Message-ID: <bug-101898-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 101898
           Summary: [concepts] ICE with auto in concept definition
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org
  Target Milestone: ---

The following valid code snippet (compiled with "-fconcepts")
triggers an ICE since GCC 6.1.0 (when concepts were introduced):

================================================
template<typename> concept bool C
  = requires(int i, void(f)(auto)) { true; };
================================================

bug.cc:2:45: internal compiler error: in pop_local_binding, at
cp/name-lookup.c:2496
    2 |   = requires(int i, void(f)(auto)) { true; };
      |                                             ^
0x6c5612 pop_local_binding(tree_node*, tree_node*)
        ../../gcc/gcc/cp/name-lookup.c:2496
0x6c5612 pop_local_binding(tree_node*, tree_node*)
        ../../gcc/gcc/cp/name-lookup.c:2484
0x9d6279 poplevel(int, int, int)
        ../../gcc/gcc/cp/decl.c:731
0xadc2a8 end_template_decl()
        ../../gcc/gcc/cp/pt.c:4738
0xaccc23 cp_parser_template_declaration_after_parameters
        ../../gcc/gcc/cp/parser.c:30992
0xacd2a0 cp_parser_explicit_template_declaration
        ../../gcc/gcc/cp/parser.c:31232
0xacfd69 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:14718
0xad078e cp_parser_toplevel_declaration
        ../../gcc/gcc/cp/parser.c:14808
0xad078e cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4978
0xad078e c_parse_file()
        ../../gcc/gcc/cp/parser.c:46558
0xbf924d c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1223
Please submit a full bug report, [etc.]

             reply	other threads:[~2021-08-13 12:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13 12:02 reichelt at gcc dot gnu.org [this message]
2021-08-13 17:46 ` [Bug c++/101898] " pinskia at gcc dot gnu.org
2021-11-01  9:39 ` pinskia 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-101898-4@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).