Bug ID: 84537
           Summary: [8 Regression] ICE in get_string, at spellcheck-tree.h
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Keywords: error-recovery, ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot
          Reporter: reichelt at gcc dot
  Target Milestone: ---

The following invalid code snippet triggers an ICE on trunk:

namespace N
  template<int> struct A {};

N::template A<> a;
================================= error: wrong number of template arguments (0, should be 1)
 N::template A<> a;
               ^ note: provided for 'template<int <anonymous> > struct N::A'
   template<int> struct A {};
                        ^ error: '<expression error>' in namespace 'N' does not name a type
 N::template A<> a;
             ^~~ internal compiler error: in get_string, at spellcheck-tree.h:46
0x620770 edit_distance_traits<tree_node*>::get_string(tree_node*)
0x620770 best_match<tree_node*, char const*>::best_match(tree_node*, unsigned
0x620770 suggest_alternative_in_explicit_scope(unsigned int, tree_node*,
0x90cf87 cp_parser_diagnose_invalid_type_name
0x9353ed cp_parser_parse_and_diagnose_invalid_type_name
0x93c76f cp_parser_simple_declaration
0x93cfd8 cp_parser_block_declaration
0x940f32 cp_parser_declaration
0x941341 cp_parser_declaration_seq_opt
0x941634 cp_parser_translation_unit
0x941634 c_parse_file()
0xa3f966 c_common_parse_file()
Please submit a full bug report, [etc.]

The regression was introduced between 2017-11-26 and 2017-12-18.

Reply via email to