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

            Bug ID: 80073
           Summary: [7 Regression] ICE with virtual base
           Product: gcc
           Version: 7.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 (compiled with -std=c++1z) triggers an ICE on
trunk:

============================
struct A {};

struct B : virtual A {};

struct C : B {} c {};
============================

bug.cc:5:20: internal compiler error: in process_init_constructor_record, at
cp/typeck2.c:1355
 struct C : B {} c {};
                    ^
0x6f1c7a process_init_constructor_record
        ../../gcc/gcc/cp/typeck2.c:1355
0x6f1c7a process_init_constructor
        ../../gcc/gcc/cp/typeck2.c:1614
0x6f1c7a digest_init_r
        ../../gcc/gcc/cp/typeck2.c:1125
0x6f3472 digest_init_flags(tree_node*, tree_node*, int, int)
        ../../gcc/gcc/cp/typeck2.c:1170
0x6f3472 store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        ../../gcc/gcc/cp/typeck2.c:797
0x6504ab check_initializer
        ../../gcc/gcc/cp/decl.c:6358
0x67a75c cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ../../gcc/gcc/cp/decl.c:7023
0x77822c cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:19383
0x778a6c cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:12766
0x779845 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:12592
0x752527 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:12489
0x782c8b cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:12365
0x782f6a cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4369
0x782f6a c_parse_file()
        ../../gcc/gcc/cp/parser.c:38356
0x8df643 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1107
Please submit a full bug report, [etc.]

Reply via email to