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++/58606] New: [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58606

            Bug ID: 58606
           Summary: [4.8/4.9 Regression] [c++11] ICE with specialization
                    in variadic template
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following valid code snippet (compiled with "-std=c++11") triggers an ICE
since GCC 4.8.0:

========================================
template<int&...> struct A
{
  template<typename> struct B;

  template<typename T> struct B<T*> {};
};
========================================

bug.cc:5:35: internal compiler error: tree check: expected record_type or
union_type or qual_union_type, have template_decl in lookup_template_class_1,
at cp/pt.c:7645
   template<typename T> struct B<T*> {};
                                   ^
0xcd83ea tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/gcc/tree.c:9176
0x54c851 tree_check3(tree_node*, char const*, int, char const*, tree_code,
tree_code, tree_code)
        ../../gcc/gcc/tree.h:2649
0x5b44be lookup_template_class_1
        ../../gcc/gcc/cp/pt.c:7645
0x5b44be lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ../../gcc/gcc/cp/pt.c:7695
0x6b4572 finish_template_type(tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/semantics.c:2856
0x64cc60 cp_parser_template_id
        ../../gcc/gcc/cp/parser.c:13219
0x64ce92 cp_parser_class_name
        ../../gcc/gcc/cp/parser.c:18752
0x642b6f cp_parser_qualifying_entity
        ../../gcc/gcc/cp/parser.c:5448
0x642b6f cp_parser_nested_name_specifier_opt
        ../../gcc/gcc/cp/parser.c:5173
0x6362ce cp_parser_class_head
        ../../gcc/gcc/cp/parser.c:19194
0x6362ce cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:18833
0x638180 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:19102
0x638180 cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:14081
0x64d679 cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:11328
0x651cf3 cp_parser_single_declaration
        ../../gcc/gcc/cp/parser.c:22580
0x654b18 cp_parser_template_declaration_after_export
        ../../gcc/gcc/cp/parser.c:22456
0x6347e2 cp_parser_member_declaration
        ../../gcc/gcc/cp/parser.c:19704
0x6357de cp_parser_member_specification_opt
        ../../gcc/gcc/cp/parser.c:19631
0x6357de cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:18886
0x638180 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:19102
Please submit a full bug report, [etc.]


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