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++/79113] New: ICE inheriting a default constructor


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

            Bug ID: 79113
           Summary: ICE inheriting a default constructor
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ed at catmur dot co.uk
  Target Milestone: ---

struct B { B(); };
struct D : B {
  using B::B;
  D(char);
};
D d;

prog.cc:6:3: internal compiler error: Segmentation fault
 D d;
   ^
0xb0569f crash_signal
        /home/heads/gcc/gcc-source/gcc/toplev.c:333
0x5dc253 build_over_call
        /home/heads/gcc/gcc-source/gcc/cp/call.c:7902
0x5d7a25 build_new_method_call_1
        /home/heads/gcc/gcc-source/gcc/cp/call.c:8786
0x5d7a25 build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, tree_node*, int, tree_node**, int)
        /home/heads/gcc/gcc-source/gcc/cp/call.c:8856
0x5d84c3 build_special_member_call(tree_node*, tree_node*, vec<tree_node*,
va_gc, vl_embed>**, tree_node*, int, int)
        /home/heads/gcc/gcc-source/gcc/cp/call.c:8387
0x6aad83 expand_default_init
        /home/heads/gcc/gcc-source/gcc/cp/init.c:1779
0x6aad83 expand_aggr_init_1
        /home/heads/gcc/gcc-source/gcc/cp/init.c:1894
0x6ab4d9 build_aggr_init(tree_node*, tree_node*, int, int)
        /home/heads/gcc/gcc-source/gcc/cp/init.c:1633
0x5f50e5 build_aggr_init_full_exprs
        /home/heads/gcc/gcc-source/gcc/cp/decl.c:6163
0x5f50e5 check_initializer
        /home/heads/gcc/gcc-source/gcc/cp/decl.c:6311
0x5f85bb cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        /home/heads/gcc/gcc-source/gcc/cp/decl.c:7023
0x686529 cp_parser_init_declarator
        /home/heads/gcc/gcc-source/gcc/cp/parser.c:19383
0x686b9d cp_parser_simple_declaration
        /home/heads/gcc/gcc-source/gcc/cp/parser.c:12766
0x6877d5 cp_parser_block_declaration
        /home/heads/gcc/gcc-source/gcc/cp/parser.c:12592
0x666307 cp_parser_declaration
        /home/heads/gcc/gcc-source/gcc/cp/parser.c:12489
0x68bc9b cp_parser_declaration_seq_opt
        /home/heads/gcc/gcc-source/gcc/cp/parser.c:12365
0x68bf82 cp_parser_translation_unit
        /home/heads/gcc/gcc-source/gcc/cp/parser.c:4369
0x68bf82 c_parse_file()
        /home/heads/gcc/gcc-source/gcc/cp/parser.c:38356
0x758153 c_common_parse_file()
        /home/heads/gcc/gcc-source/gcc/c-family/c-opts.c:1107

Versions up to 6.3 reject (no matching function for call to 'D::D()'), I think
incorrectly. Current 7.0 trunk ICEs as above.

clang accepts since 3.9.0.

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