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

* [Bug c++/58965] [4.8/4.9 Regression] [c++11] ICE with member initializer in static union
  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 ` reichelt at gcc dot gnu.org
  2013-11-01 19:42 ` paolo.carlini at oracle dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-11-01 19:30 UTC (permalink / raw)
  To: gcc-bugs

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

Volker Reichelt <reichelt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
      Known to work|                            |4.7.0
   Target Milestone|---                         |4.8.3
      Known to fail|                            |4.8.0, 4.9.0


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

* [Bug c++/58965] [4.8/4.9 Regression] [c++11] ICE with member initializer in static union
  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
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-11-01 19:42 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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

* [Bug c++/58965] [4.8/4.9 Regression] [c++11] ICE with member initializer in static union
  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
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-11-03 18:51 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-11-03
                 CC|                            |mpolacek at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.


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

* [Bug c++/58965] [4.8/4.9 Regression] [c++11] ICE with member initializer in static union
  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
                   ` (2 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-03  3:56 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |jason at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org


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

* [Bug c++/58965] [4.8/4.9 Regression] [c++11] ICE with member initializer in static union
  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
                   ` (3 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-07 21:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Jan  7 21:24:37 2014
New Revision: 206405

URL: http://gcc.gnu.org/viewcvs?rev=206405&root=gcc&view=rev
Log:
    PR c++/58965
    * mangle.c (write_guarded_var_name): Handle null DECL_NAME.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/nsdmi-union3.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/mangle.c


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

* [Bug c++/58965] [4.8/4.9 Regression] [c++11] ICE with member initializer in static union
  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
                   ` (4 preceding siblings ...)
  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
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-27 13:59 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 4.8.3/4.9.


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

* [Bug c++/58965] [4.8/4.9 Regression] [c++11] ICE with member initializer in static union
  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
                   ` (5 preceding siblings ...)
  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
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-27 13:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Mon Jan 27 13:58:42 2014
New Revision: 207130

URL: http://gcc.gnu.org/viewcvs?rev=207130&root=gcc&view=rev
Log:
    PR c++/58965
    * mangle.c (write_guarded_var_name): Handle null DECL_NAME.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/nsdmi-union3.C
Modified:
    branches/gcc-4_8-branch/gcc/cp/ChangeLog
    branches/gcc-4_8-branch/gcc/cp/mangle.c


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

* [Bug c++/58965] [4.8/4.9 Regression] [c++11] ICE with member initializer in static union
  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
                   ` (6 preceding siblings ...)
  2014-01-27 13:59 ` jason at gcc dot gnu.org
@ 2014-01-27 16:25 ` jason at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-27 16:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
*** Bug 58701 has been marked as a duplicate of this bug. ***


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