public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58882] New: ICE with invalid C99 style designated initializers
@ 2013-10-25 20:36 reichelt at gcc dot gnu.org
  2014-12-12 22:03 ` [Bug c++/58882] " paolo.carlini at oracle dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-10-25 20:36 UTC (permalink / raw)
  To: gcc-bugs

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.]


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-12-15 16:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-25 20:36 [Bug c++/58882] New: ICE with invalid C99 style designated initializers reichelt at gcc dot gnu.org
2014-12-12 22:03 ` [Bug c++/58882] " paolo.carlini at oracle dot com
2014-12-12 23:22 ` paolo.carlini at oracle dot com
2014-12-15 16:17 ` paolo at gcc dot gnu.org
2014-12-15 16:18 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).