https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103273
Bug ID: 103273 Summary: [12 Regression] internal compiler error: in cp_parser_type_id_1, at cp/parser.c:24010 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: steinar+gcc at gunderson dot no Target Milestone: --- Found while minimizing another regression: gcc version 12.0.0 20210918 (experimental) [master r12-3644-g7afcb534239] (Debian 20210918-1) bigscreen:~/creduce> cat fts0opt.i template <class a> struct b; b < b struct { bigscreen:~/creduce> /usr/lib/gcc-snapshot/bin/g++ -c fts0opt.i fts0opt.i:2:14: error: types may not be defined in template arguments 2 | b < b struct { | ^ fts0opt.i:2:15: error: expected '}' at end of input 2 | b < b struct { | ~^ fts0opt.i:2:15: internal compiler error: in cp_parser_type_id_1, at cp/parser.c:24010 0x6fa6a2 cp_parser_type_id_1 /build/gcc-snapshot-FKpLPc/gcc-snapshot-20210918/src/gcc/cp/parser.c:24010 0xf578c3 cp_parser_template_type_arg /build/gcc-snapshot-FKpLPc/gcc-snapshot-20210918/src/gcc/cp/parser.c:24105 0xf579ef cp_parser_template_argument /build/gcc-snapshot-FKpLPc/gcc-snapshot-20210918/src/gcc/cp/parser.c:18660 0xf579ef cp_parser_template_argument_list /build/gcc-snapshot-FKpLPc/gcc-snapshot-20210918/src/gcc/cp/parser.c:18571 0xf579ef cp_parser_enclosed_template_argument_list /build/gcc-snapshot-FKpLPc/gcc-snapshot-20210918/src/gcc/cp/parser.c:31853 0xf58e76 cp_parser_template_id /build/gcc-snapshot-FKpLPc/gcc-snapshot-20210918/src/gcc/cp/parser.c:18108 0xf5969b cp_parser_class_name /build/gcc-snapshot-FKpLPc/gcc-snapshot-20210918/src/gcc/cp/parser.c:25535 0xf5035a cp_parser_qualifying_entity /build/gcc-snapshot-FKpLPc/gcc-snapshot-20210918/src/gcc/cp/parser.c:7048 0xf5035a cp_parser_nested_name_specifier_opt /build/gcc-snapshot-FKpLPc/gcc-snapshot-20210918/src/gcc/cp/parser.c:6730 0xf45f4d cp_parser_constructor_declarator_p /build/gcc-snapshot-FKpLPc/gcc-snapshot-20210918/src/gcc/cp/parser.c:30712 0xf45f4d cp_parser_decl_specifier_seq /build/gcc-snapshot-FKpLPc/gcc-snapshot-20210918/src/gcc/cp/parser.c:15743 0xf469b4 cp_parser_simple_declaration /build/gcc-snapshot-FKpLPc/gcc-snapshot-20210918/src/gcc/cp/parser.c:15006 0xf76f25 cp_parser_declaration /build/gcc-snapshot-FKpLPc/gcc-snapshot-20210918/src/gcc/cp/parser.c:14819 0xf778fe cp_parser_toplevel_declaration /build/gcc-snapshot-FKpLPc/gcc-snapshot-20210918/src/gcc/cp/parser.c:14840 0xf778fe cp_parser_translation_unit /build/gcc-snapshot-FKpLPc/gcc-snapshot-20210918/src/gcc/cp/parser.c:4978 0xf778fe c_parse_file() /build/gcc-snapshot-FKpLPc/gcc-snapshot-20210918/src/gcc/cp/parser.c:47653 0x10a4a4d c_common_parse_file() /build/gcc-snapshot-FKpLPc/gcc-snapshot-20210918/src/gcc/c-family/c-opts.c:1236 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-snapshot/README.Bugs> for instructions.