[Bug c++/97895] New: [11 Regression] ICE in do_auto_deduction, at cp/pt.c:29255

gscfq@t-online.de gcc-bugzilla@gcc.gnu.org
Wed Nov 18 16:34:52 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97895

            Bug ID: 97895
           Summary: [11 Regression] ICE in do_auto_deduction, at
                    cp/pt.c:29255
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Changed recently between 20201018 and 20201108 :


$ cat z1.cc
namespace std {
  template<typename T> struct initializer_list {
    const T *ptr;
    decltype(sizeof 0) n;
  };
  auto a = {};
}


$ g++-11-20201115 -c z1.cc
z1.cc:6:13: internal compiler error: Segmentation fault
    6 |   auto a = {};
      |             ^
0xc727ef crash_signal
        ../../gcc/toplev.c:330
0x7642c1 vec<constructor_elt, va_gc, vl_embed>::end()
        ../../gcc/vec.h:585
0x7642c1 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
        ../../gcc/cp/pt.c:29255
0x6c4cf2 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ../../gcc/cp/decl.c:7570
0x74d7f7 cp_parser_init_declarator
        ../../gcc/cp/parser.c:21362
0x72f42a cp_parser_simple_declaration
        ../../gcc/cp/parser.c:13943
0x75307a cp_parser_declaration
        ../../gcc/cp/parser.c:13640
0x753d34 cp_parser_declaration_seq_opt
        ../../gcc/cp/parser.c:13485
0x753d34 cp_parser_namespace_body
        ../../gcc/cp/parser.c:19955
0x753d34 cp_parser_namespace_definition
        ../../gcc/cp/parser.c:19933
0x752eaf cp_parser_declaration
        ../../gcc/cp/parser.c:13620
0x75390a cp_parser_translation_unit
        ../../gcc/cp/parser.c:4806
0x75390a c_parse_file()
        ../../gcc/cp/parser.c:44595
0x81d252 c_common_parse_file()
        ../../gcc/c-family/c-opts.c:1196


More information about the Gcc-bugs mailing list