https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95938
Bug ID: 95938 Summary: ICE in synthesize_implicit_template_parm, at cp/parser.c:44077 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-trunk ICE. $cat bug.cc a ( union { auto $g++ bug.cc bug.cc:1:11: error: types may not be defined in parameter types 1 | a ( union { auto | ^ bug.cc:1:13: internal compiler error: in synthesize_implicit_template_parm, at cp/parser.c:44077 1 | a ( union { auto | ^~~~ 0x642457 synthesize_implicit_template_parm ../../gcc/cp/parser.c:44077 0x9bd740 cp_parser_simple_type_specifier ../../gcc/cp/parser.c:18029 0x9a1a3d cp_parser_type_specifier ../../gcc/cp/parser.c:17838 0x9a2a02 cp_parser_decl_specifier_seq ../../gcc/cp/parser.c:14410 0x9cb167 cp_parser_member_declaration ../../gcc/cp/parser.c:24995 0x99f921 cp_parser_member_specification_opt ../../gcc/cp/parser.c:24850 0x99f921 cp_parser_class_specifier_1 ../../gcc/cp/parser.c:23947 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 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.