http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58882
Bug ID: 58882 Summary: ICE with invalid C99 style designated initializers 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 invalid code snippet triggers an ICE since GCC 4.7.0 (when C99 style designated initializers were introduced in the C++ front-end): ============================= int a[] = { [0.] = 0 }; ============================= bug.cc:1:22: internal compiler error: in check_array_designated_initializer, at cp/decl.c:4812 int a[] = { [0.] = 0 }; ^ 0x55aa63 check_array_designated_initializer ../../gcc/gcc/cp/decl.c:4812 0x562bbf reshape_init_array_1 ../../gcc/gcc/cp/decl.c:5109 0x561c79 reshape_init(tree_node*, tree_node*, int) ../../gcc/gcc/cp/decl.c:5498 0x563cd3 check_initializer ../../gcc/gcc/cp/decl.c:5667 0x5766fc cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc/gcc/cp/decl.c:6356 0x663f57 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16652 0x66569f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:11066 0x6495e0 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10947 0x6708fe cp_parser_declaration ../../gcc/gcc/cp/parser.c:10844 0x66f61a cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10730 0x670f36 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3990 0x670f36 c_parse_file() ../../gcc/gcc/cp/parser.c:30999 0x78e183 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]