public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "haoxintu at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95927] New: ICE in cp_lexer_new_from_tokens, at cp/parser.c:701 Date: Sat, 27 Jun 2020 02:21:29 +0000 [thread overview] Message-ID: <bug-95927-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95927 Bug ID: 95927 Summary: ICE in cp_lexer_new_from_tokens, at cp/parser.c:701 Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- This code, bug.cc, reduced by C-Reduce, makes GCC ICE. $cat bug.cc class { struct a < struct { b ( { $g++ bug.cc bug.cc:2:8: error: ‘a’ is not a class template 2 | struct a < struct { b ( { | ^ bug.cc:2:19: error: types may not be defined in template arguments 2 | struct a < struct { b ( { | ^ bug.cc:2:25: error: expected identifier before ‘{’ token 2 | struct a < struct { b ( { | ^ bug.cc:2:24: error: expected ‘)’ before ‘{’ token 2 | struct a < struct { b ( { | ~^~ | ) bug.cc:2:21: error: ISO C++ forbids declaration of ‘b’ with no type []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-fpermissive-fpermissive]8;;] 2 | struct a < struct { b ( { | ^ bug.cc:3: error: expected ‘}’ at end of input bug.cc:2:19: note: to match this ‘{’ 2 | struct a < struct { b ( { | ^ bug.cc:3: error: expected template-argument at end of input bug.cc:3: error: expected ‘>’ at end of input bug.cc:3: error: expected ‘{’ or ‘:’ at end of input bug.cc:3: error: expected ‘{’ at end of input bug.cc:3: error: expected unqualified-id at end of input bug.cc:3: error: expected ‘}’ at end of input bug.cc:1:7: note: to match this ‘{’ 1 | class { | ^ bug.cc:3: internal compiler error: in cp_lexer_new_from_tokens, at cp/parser.c:701 0x641d4d cp_parser_push_lexer_for_tokens ../../gcc/cp/parser.c:701 0x9c2bc5 cp_parser_late_parsing_for_member ../../gcc/cp/parser.c:29944 0x9a0ccb cp_parser_class_specifier_1 ../../gcc/cp/parser.c:24230 0x9a1aa3 cp_parser_class_specifier ../../gcc/cp/parser.c:24254 0x9a1aa3 cp_parser_type_specifier ../../gcc/cp/parser.c:17762 0x9a2a02 cp_parser_decl_specifier_seq ../../gcc/cp/parser.c:14410 0x9a35c1 cp_parser_simple_declaration ../../gcc/cp/parser.c:13664 0x9cc926 cp_parser_declaration ../../gcc/cp/parser.c:13484 0x9cd06a cp_parser_translation_unit ../../gcc/cp/parser.c:4761 0x9cd06a c_parse_file() ../../gcc/cp/parser.c:44043 0xae4dbb c_common_parse_file() ../../gcc/c-family/c-opts.c:1190 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. $g++ --version g++ (GCC) 11.0.0 20200626 (experimental) Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
next reply other threads:[~2020-06-27 2:21 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-27 2:21 haoxintu at gmail dot com [this message] 2020-07-03 4:17 ` [Bug c++/95927] " haoxintu at gmail dot com 2020-07-08 21:50 ` mpolacek at gcc dot gnu.org 2021-12-29 0:24 ` 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-95927-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: 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).