[Bug c++/85325] New: ICE on class template partial specialization for c++17

jpelletier at jumptrading dot com gcc-bugzilla@gcc.gnu.org
Tue Apr 10 17:18:00 GMT 2018


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

            Bug ID: 85325
           Summary: ICE on class template partial specialization for c++17
           Product: gcc
           Version: 7.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jpelletier at jumptrading dot com
  Target Milestone: ---

Created attachment 43899
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43899&action=edit
sample code

The attached code results in an ICE when compiled with --std=c++17, but works
fine for --std=c++14. Also changing U to just a typename compiles fine for
both.

output:

% g++ --std=c++17 test.cpp                         12:05:25
test.cpp:8:44: internal compiler error: Segmentation fault
 struct X<T, E, U, std::index_sequence<Is...>>
                                            ^~
0xaa68af crash_signal
        ../../gcc/toplev.c:337
0x5dc5bd tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../gcc/cp/pt.c:13479
0x5db06a unify
        ../../gcc/cp/pt.c:20586
0x5da608 unify
        ../../gcc/cp/pt.c:20764
0x5db747 coerce_template_template_parms
        ../../gcc/cp/pt.c:7162
0x5e9eea convert_template_argument
        ../../gcc/cp/pt.c:7566
0x5eb1dc coerce_template_parms
        ../../gcc/cp/pt.c:8128
0x5eda60 lookup_template_class_1
        ../../gcc/cp/pt.c:8664
0x5eda60 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ../../gcc/cp/pt.c:9009
0x68399d finish_template_type(tree_node*, tree_node*, int)
        ../../gcc/cp/semantics.c:3151
0x632c54 cp_parser_template_id
        ../../gcc/cp/parser.c:15495
0x632d9f cp_parser_class_name
        ../../gcc/cp/parser.c:21953
0x642726 cp_parser_qualifying_entity
        ../../gcc/cp/parser.c:6286
0x642726 cp_parser_nested_name_specifier_opt
        ../../gcc/cp/parser.c:5972
0x638675 cp_parser_class_head
        ../../gcc/cp/parser.c:22440
0x638675 cp_parser_class_specifier_1
        ../../gcc/cp/parser.c:22037
0x639c91 cp_parser_class_specifier
        ../../gcc/cp/parser.c:22350
0x639c91 cp_parser_type_specifier
        ../../gcc/cp/parser.c:16423
0x6489ea cp_parser_decl_specifier_seq
        ../../gcc/cp/parser.c:13330
0x636f3b cp_parser_single_declaration
        ../../gcc/cp/parser.c:26629
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.


More information about the Gcc-bugs mailing list