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

            Bug ID: 84770
           Summary: [8 Regression] ICE with parameter pack involving
                    typedef
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org
  Target Milestone: ---

The following valid code snippet triggers an ICE on trunk:

=================================
typedef int T;

template<T&...> struct A {};

int i;

A<i> a;
=================================

bug.cc: In instantiation of 'struct A<i>':
bug.cc:7:6:   required from here
bug.cc:3:26: internal compiler error: in verify_unstripped_args, at
cp/pt.c:1154
 template<T&...> struct A {};
                          ^
0x636980 verify_unstripped_args
        ../../gcc/gcc/cp/pt.c:1154
0x636980 retrieve_specialization
        ../../gcc/gcc/cp/pt.c:1194
0x97aadc tsubst_decl
        ../../gcc/gcc/cp/pt.c:13247
0x9740ef tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../gcc/gcc/cp/pt.c:13812
0x98ce1a instantiate_class_template_1
        ../../gcc/gcc/cp/pt.c:10806
0x98ce1a instantiate_class_template(tree_node*)
        ../../gcc/gcc/cp/pt.c:11055
0x9d38fd complete_type(tree_node*)
        ../../gcc/gcc/cp/typeck.c:136
0x883867 start_decl_1(tree_node*, bool)
        ../../gcc/gcc/cp/decl.c:5241
0x8a96af start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
        ../../gcc/gcc/cp/decl.c:5204
0x9391e9 cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:19598
0x940928 cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:13057
0x941738 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:12882
0x945692 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:12780
0x945aa1 cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:12656
0x945d94 cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4561
0x945d94 c_parse_file()
        ../../gcc/gcc/cp/parser.c:38995
0xa44906 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1132
Please submit a full bug report, [etc.]

The regression was introduced between 2017-05-06 and 2017-05-12.

Reply via email to