public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58510] New: [4.9 regression] [c++0x] ICE with multiple non-static data initializations in union
@ 2013-09-23 18:32 reichelt at gcc dot gnu.org
  2013-09-24  7:44 ` [Bug c++/58510] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-09-23 18:32 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58510
           Summary: [4.9 regression] [c++0x] ICE with multiple non-static
                    data initializations in 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 invalid code snippet (compiled with "-std=c++0x") triggers an ICE
on trunk:

========================
void foo()
{
  union
  {
    int i = 0;
    char c = 0;
  };
}
========================

bug.cc: In function 'void foo()':
bug.cc:4:3: error: multiple fields in union 'foo()::<anonymous union>'
initialized
   {
   ^
bug.cc: In constructor 'constexpr foo()::<anonymous union>::<constructor>()':
bug.cc:4:3: error: initializations for multiple members of 'foo()::<anonymous
union>'
bug.cc: In function 'void foo()':
bug.cc:7:4: note: synthesized method 'constexpr foo()::<anonymous
union>::<constructor>()' first required here 
   };
    ^
bug.cc:7:4: internal compiler error: in complete_ctor_at_level_p, at
expr.c:5650
0x89a301 complete_ctor_at_level_p(tree_node const*, long, tree_node const*)
        ../../gcc/gcc/expr.c:5650
0x89a68e categorize_ctor_elements_1
        ../../gcc/gcc/expr.c:5602
0x9684b6 gimplify_init_constructor
        ../../gcc/gcc/gimplify.c:3966
0x96993e gimplify_modify_expr_rhs
        ../../gcc/gcc/gimplify.c:4518
0x969cad gimplify_modify_expr
        ../../gcc/gcc/gimplify.c:4834
0x95e07b gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
        ../../gcc/gcc/gimplify.c:7322
0x961ef6 gimplify_stmt(tree_node**, gimple_statement_d**)
        ../../gcc/gcc/gimplify.c:5699
0x95f987 gimplify_and_add
        ../../gcc/gcc/gimplify.c:329
0x95f987 gimplify_decl_expr
        ../../gcc/gcc/gimplify.c:1472
0x95f987 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
        ../../gcc/gcc/gimplify.c:7489
0x961ef6 gimplify_stmt(tree_node**, gimple_statement_d**)
        ../../gcc/gcc/gimplify.c:5699
0x95eccf gimplify_cleanup_point_expr
        ../../gcc/gcc/gimplify.c:5475
0x95eccf gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
        ../../gcc/gcc/gimplify.c:7659
0x961ef6 gimplify_stmt(tree_node**, gimple_statement_d**)
        ../../gcc/gcc/gimplify.c:5699
0x962bb1 gimplify_bind_expr
        ../../gcc/gcc/gimplify.c:1213
0x95e73f gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
        ../../gcc/gcc/gimplify.c:7493
0x961ef6 gimplify_stmt(tree_node**, gimple_statement_d**)
        ../../gcc/gcc/gimplify.c:5699
0x963541 gimplify_body(tree_node*, bool)
        ../../gcc/gcc/gimplify.c:8356
0x9639f6 gimplify_function_tree(tree_node*)
        ../../gcc/gcc/gimplify.c:8488
0x7fa9d7 analyze_function
        ../../gcc/gcc/cgraphunit.c:636
Please submit a full bug report, [etc.]


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

end of thread, other threads:[~2013-10-03 16:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-23 18:32 [Bug c++/58510] New: [4.9 regression] [c++0x] ICE with multiple non-static data initializations in union reichelt at gcc dot gnu.org
2013-09-24  7:44 ` [Bug c++/58510] " rguenth at gcc dot gnu.org
2013-09-24 16:55 ` mpolacek at gcc dot gnu.org
2013-09-25  9:38 ` [Bug c++/58510] [4.9 Regression] " mpolacek at gcc dot gnu.org
2013-09-25  9:47 ` mpolacek at gcc dot gnu.org
2013-10-03 16:33 ` [Bug c++/58510] [4.9 Regression] [c++11] " mpolacek at gcc dot gnu.org
2013-10-03 16:34 ` mpolacek 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).