This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/84822] New: Partial specializing template<auto> internal compiler error


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

            Bug ID: 84822
           Summary: Partial specializing template<auto> internal compiler
                    error
           Product: gcc
           Version: 7.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: feiteng at gmail dot com
  Target Milestone: ---

Created attachment 43625
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43625&action=edit
the preprocessed file (*.i*) that triggers the bug

When partially specializing template<auto> with more than one auto non-type
template parameters, a mixed usage of auto non-type template argument and named
non-type template argument causes ICE. 
Example code 
https://godbolt.org/g/3GebP8 
contains several variants of the error.

g++ (Ubuntu 7.2.0-1ubuntu1~16.04) 7.2.0

g++ partialspecializationbug.cpp -std=c++17

partialspecializationbug.cpp:72:34: internal compiler error: Segmentation fault
     Listener<&Foo::evt, &Bar::f> conn;
                                  ^~~~
0xae558f crash_signal
        ../../src/gcc/toplev.c:337
0x5e187a unify
        ../../src/gcc/cp/pt.c:20513
0x5e1680 unify
        ../../src/gcc/cp/pt.c:21006
0x5f36e1 unify_one_argument
        ../../src/gcc/cp/pt.c:19128
0x5f8726 type_unification_real
        ../../src/gcc/cp/pt.c:19248
0x5e0313 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
        ../../src/gcc/cp/pt.c:25537
0x5e1f5d unify
        ../../src/gcc/cp/pt.c:20662
0x5e1508 unify
        ../../src/gcc/cp/pt.c:20851
0x5e2991 get_partial_spec_bindings
        ../../src/gcc/cp/pt.c:21648
0x5e2d1d most_specialized_partial_spec
        ../../src/gcc/cp/pt.c:21919
0x5fe4db instantiate_class_template_1
        ../../src/gcc/cp/pt.c:10312
0x5fe4db instantiate_class_template(tree_node*)
        ../../src/gcc/cp/pt.c:10880
0x662305 complete_type(tree_node*)
        ../../src/gcc/cp/typeck.c:133
0x5cea01 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
        ../../src/gcc/cp/decl.c:12043
0x61e302 grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*,
bool, tree_node*, tree_node*)
        ../../src/gcc/cp/decl2.c:806
0x63343b cp_parser_member_declaration
        ../../src/gcc/cp/parser.c:23419
0x633e0a cp_parser_member_specification_opt
        ../../src/gcc/cp/parser.c:22968
0x633e0a cp_parser_class_specifier_1
        ../../src/gcc/cp/parser.c:22121
0x635a61 cp_parser_class_specifier
        ../../src/gcc/cp/parser.c:22373
0x635a61 cp_parser_type_specifier
        ../../src/gcc/cp/parser.c:16446

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]