https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95956
Bug ID: 95956 Summary: ICE in check_bases, at cp/class.c:1689 Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: error-recovery, 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-trunk ICE. $cat bug.cc a ( auto struct : decltype ( auto ) { { $g++ bug.cc bug.cc:1:5: warning: use of ‘auto’ in parameter declaration only available with ‘-fconcepts-ts’ 1 | a ( auto struct : decltype ( auto ) { { | ^~~~ bug.cc:1:38: error: types may not be defined in parameter types 1 | a ( auto struct : decltype ( auto ) { { | ^ bug.cc:1:40: error: expected unqualified-id before ‘{’ token 1 | a ( auto struct : decltype ( auto ) { { | ^ bug.cc:2: error: expected ‘}’ at end of input bug.cc:1:38: note: to match this ‘{’ 1 | a ( auto struct : decltype ( auto ) { { | ^ bug.cc:1:17: internal compiler error: in check_bases, at cp/class.c:1689 1 | a ( auto struct : decltype ( auto ) { { | ^ 0x5ed0ac check_bases ../../gcc/cp/class.c:1689 0x5ed0ac check_bases_and_members ../../gcc/cp/class.c:5900 0x89eca3 finish_struct_1(tree_node*) ../../gcc/cp/class.c:7269 0x8a06d4 finish_struct(tree_node*, tree_node*) ../../gcc/cp/class.c:7573 0x99f973 cp_parser_class_specifier_1 ../../gcc/cp/parser.c:23955 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 0x9bf3ef cp_parser_parameter_declaration ../../gcc/cp/parser.c:22818 0x9bfdd2 cp_parser_parameter_declaration_list ../../gcc/cp/parser.c:22641 0x9c01bc cp_parser_parameter_declaration_clause ../../gcc/cp/parser.c:22568 0x9ad617 cp_parser_direct_declarator ../../gcc/cp/parser.c:21245 0x9ad617 cp_parser_declarator ../../gcc/cp/parser.c:21109 0x9c1ba6 cp_parser_init_declarator ../../gcc/cp/parser.c:20609 0x9a36d2 cp_parser_simple_declaration ../../gcc/cp/parser.c:13785 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.