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++/79363] New: [6/7 Regression] ICE with NSDMI and array


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

            Bug ID: 79363
           Summary: [6/7 Regression] ICE with NSDMI and array
           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 triggers an ICE since GCC 6.1.0:

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

struct B
{
  B() {}
  int i;
  A a[]{};
};
==================

bug.cc: In constructor 'B::B()':
bug.cc:5:7: internal compiler error: tree check: expected tree that contains
'common' structure, have 'constructor' in perform_member_init, at cp/init.c:725
   B() {}
       ^
0x10301f4 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
        ../../gcc/gcc/tree.c:9986
0x7c3da2 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        ../../gcc/gcc/tree.h:3174
0x7c3da2 perform_member_init
        ../../gcc/gcc/cp/init.c:725
0x7c3da2 emit_mem_initializers(tree_node*)
        ../../gcc/gcc/cp/init.c:1203
0x76a3d6 cp_parser_ctor_initializer_opt
        ../../gcc/gcc/cp/parser.c:14016
0x76a3d6 cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/gcc/cp/parser.c:21423
0x772dc1 cp_parser_function_definition_after_declarator
        ../../gcc/gcc/cp/parser.c:26206
0x77319c cp_parser_late_parsing_for_member
        ../../gcc/gcc/cp/parser.c:27088
0x74f9c9 cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:22292
0x750a59 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:22318
0x750a59 cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:16409
0x751827 cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:13326
0x778901 cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:12647
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.]

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