public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58965] New: [4.8/4.9 Regression] [c++11] ICE with member initializer in static union
@ 2013-11-01 19:29 reichelt at gcc dot gnu.org
  2013-11-01 19:30 ` [Bug c++/58965] " reichelt at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-11-01 19:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58965

            Bug ID: 58965
           Summary: [4.8/4.9 Regression] [c++11] ICE with member
                    initializer in static union
           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 valid code snippet (compiled with "-std=c++11") triggers an ICE
since GCC 4.8.0:

=====================
void foo()
{
  static union
  {
    int i = i;
  };
}
=====================

bug.cc: In function 'void foo()':
bug.cc:6:4: internal compiler error: Segmentation fault
   };
    ^
0xb2d0df crash_signal
        ../../gcc/gcc/toplev.c:334
0x713c15 tree_check
        ../../gcc/gcc/tree.h:2691
0x713c15 write_guarded_var_name
        ../../gcc/gcc/cp/mangle.c:3791
0x713e36 mangle_guard_variable(tree_node*)
        ../../gcc/gcc/cp/mangle.c:3807
0x6214bb get_guard(tree_node*)
        ../../gcc/gcc/cp/decl2.c:2739
0x577865 expand_static_init
        ../../gcc/gcc/cp/decl.c:6965
0x577865 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ../../gcc/gcc/cp/decl.c:6500
0x58a928 shadow_tag(cp_decl_specifier_seq*)
        ../../gcc/gcc/cp/decl.c:4389
0x6655a1 cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:11142
0x6492e0 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:10945
0x64a403 cp_parser_declaration_statement
        ../../gcc/gcc/cp/parser.c:10592
0x64aa77 cp_parser_statement
        ../../gcc/gcc/cp/parser.c:9333
0x64b779 cp_parser_statement_seq_opt
        ../../gcc/gcc/cp/parser.c:9611
0x64b8ee cp_parser_compound_statement
        ../../gcc/gcc/cp/parser.c:9565
0x65eefb cp_parser_function_body
        ../../gcc/gcc/cp/parser.c:18418
0x65eefb cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/gcc/cp/parser.c:18454
0x6632ef cp_parser_function_definition_after_declarator
        ../../gcc/gcc/cp/parser.c:22465
0x6640c2 cp_parser_function_definition_from_specifiers_and_declarator
        ../../gcc/gcc/cp/parser.c:22386
0x6640c2 cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:16429
0x66533f cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:11064
Please submit a full bug report, [etc.]

The code was correctly accepted in GCC 4.7.0.


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

end of thread, other threads:[~2014-01-27 16:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-01 19:29 [Bug c++/58965] New: [4.8/4.9 Regression] [c++11] ICE with member initializer in static union reichelt at gcc dot gnu.org
2013-11-01 19:30 ` [Bug c++/58965] " reichelt at gcc dot gnu.org
2013-11-01 19:42 ` paolo.carlini at oracle dot com
2013-11-03 18:51 ` mpolacek at gcc dot gnu.org
2014-01-03  3:56 ` jason at gcc dot gnu.org
2014-01-07 21:24 ` jason at gcc dot gnu.org
2014-01-27 13:59 ` jason at gcc dot gnu.org
2014-01-27 13:59 ` jason at gcc dot gnu.org
2014-01-27 16:25 ` jason at gcc dot gnu.org

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