https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104235
Bug ID: 104235 Summary: [12 Regression] ICE: in cp_parser_template_id, at cp/parser.cc 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: glisse at gcc dot gnu.org Target Milestone: --- template <class M> struct L: M { using M::a; void p() { this->template a<>; } }; (accepted by g++-11 and clang++-13) bug.cc: In member function 'void L<M>::p()': bug.cc:4:31: internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367 4 | void p() { this->template a<>; } | ^ 0x719e9c cp_parser_template_id ../../src/gcc/cp/parser.cc:18367 0xfa5beb cp_parser_class_name ../../src/gcc/cp/parser.cc:25694 0xf9bddb cp_parser_qualifying_entity ../../src/gcc/cp/parser.cc:7118 0xf9bddb cp_parser_nested_name_specifier_opt ../../src/gcc/cp/parser.cc:6800 0xf9da5a cp_parser_id_expression ../../src/gcc/cp/parser.cc:6148 0xfa63cf cp_parser_postfix_dot_deref_expression ../../src/gcc/cp/parser.cc:8305 0xf9a103 cp_parser_postfix_expression ../../src/gcc/cp/parser.cc:7904 0xf81eea cp_parser_binary_expression ../../src/gcc/cp/parser.cc:10041 0xf82a4e cp_parser_assignment_expression ../../src/gcc/cp/parser.cc:10345 0xf84579 cp_parser_expression ../../src/gcc/cp/parser.cc:10515 0xf87b97 cp_parser_expression_statement ../../src/gcc/cp/parser.cc:12711 0xf950b7 cp_parser_statement ../../src/gcc/cp/parser.cc:12507 0xf9619d cp_parser_statement_seq_opt ../../src/gcc/cp/parser.cc:12856 0xf96277 cp_parser_compound_statement ../../src/gcc/cp/parser.cc:12808 0xfb6565 cp_parser_function_body ../../src/gcc/cp/parser.cc:25052 0xfb6565 cp_parser_ctor_initializer_opt_and_function_body ../../src/gcc/cp/parser.cc:25103 0xfb746e cp_parser_function_definition_after_declarator ../../src/gcc/cp/parser.cc:31229 0xfb791c cp_parser_late_parsing_for_member ../../src/gcc/cp/parser.cc:32150 0xf8fb2a cp_parser_class_specifier_1 ../../src/gcc/cp/parser.cc:26170 0xf90b72 cp_parser_class_specifier ../../src/gcc/cp/parser.cc:26194