[Bug c++/59798] New: ICE befriending an inheriting constructor template specialization

richard-gccbugzilla at metafoo dot co.uk gcc-bugzilla@gcc.gnu.org
Tue Jan 14 00:42:00 GMT 2014


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

            Bug ID: 59798
           Summary: ICE befriending an inheriting constructor template
                    specialization
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: richard-gccbugzilla at metafoo dot co.uk

This:

  struct A { template<typename T> A(T); };
  struct B : A { using A::A; };
  struct C { friend B::B<int>(int); };
  B b(0);

gives this:

<stdin>:3:21: internal compiler error: tree check: expected record_type or
union_type or qual_union_type, have integer_type in lookup_base, at
cp/search.c:215
0xd619a4 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../src/gcc/tree.c:9192
0x6be836 tree_check3
        ../../src/gcc/tree.h:2747
0x6be836 lookup_base(tree_node*, tree_node*, int, base_kind*, int)
        ../../src/gcc/cp/search.c:215
0x619b21 build_base_path(tree_code, tree_node*, tree_node*, int, int)
        ../../src/gcc/cp/class.c:281
0x6b1273 add_one_base_init
        ../../src/gcc/cp/method.c:515
0x6b7ad1 do_build_copy_constructor
        ../../src/gcc/cp/method.c:574
0x6b7ad1 synthesize_method(tree_node*)
        ../../src/gcc/cp/method.c:796
0x628444 mark_used(tree_node*, int)
        ../../src/gcc/cp/decl2.c:4779
0x5554a9 build_over_call
        ../../src/gcc/cp/call.c:7119
0x550e85 build_new_method_call_1
        ../../src/gcc/cp/call.c:7818
0x550e85 build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, tree_node*, int, tree_node**, int)
        ../../src/gcc/cp/call.c:7888
0x551f67 build_special_member_call(tree_node*, tree_node*, vec<tree_node*,
va_gc, vl_embed>**, tree_node*, int, int)
        ../../src/gcc/cp/call.c:7444
0x6a9739 expand_default_init
        ../../src/gcc/cp/init.c:1673
0x6a9739 expand_aggr_init_1
        ../../src/gcc/cp/init.c:1774
0x6ac403 build_aggr_init(tree_node*, tree_node*, int, int)
        ../../src/gcc/cp/init.c:1525
0x5663f4 build_aggr_init_full_exprs
        ../../src/gcc/cp/decl.c:5591
0x5663f4 check_initializer
        ../../src/gcc/cp/decl.c:5727
0x578c8d cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ../../src/gcc/cp/decl.c:6396
0x668fbd cp_parser_init_declarator
        ../../src/gcc/cp/parser.c:16804
0x66a76f cp_parser_simple_declaration
        ../../src/gcc/cp/parser.c:11195



More information about the Gcc-bugs mailing list