http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58651
Bug ID: 58651
Summary: [4.7/4.8/4.9 Regression] ICE with invalid initializer
list
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=11") triggers an ICE
since GCC 4.4.1:
==============================
struct A
{
int i;
A(int j) : i{{j}} {}
};
A a(0);
==============================
bug.cc: In constructor 'A::A(int)':
bug.cc:4:19: internal compiler error: in gimplify_init_constructor, at
gimplify.c:4236
A(int j) : i{{j}} {}
^
0x96f293 gimplify_init_constructor
../../gcc/gcc/gimplify.c:4236
0x970a7e gimplify_modify_expr_rhs
../../gcc/gcc/gimplify.c:4518
0x970de4 gimplify_modify_expr
../../gcc/gcc/gimplify.c:4834
0x9661d5 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../gcc/gcc/gimplify.c:7332
0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**)
../../gcc/gcc/gimplify.c:5709
0x9656fe gimplify_cleanup_point_expr
../../gcc/gcc/gimplify.c:5485
0x9656fe gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../gcc/gcc/gimplify.c:7669
0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**)
../../gcc/gcc/gimplify.c:5709
0x969e7d gimplify_bind_expr
../../gcc/gcc/gimplify.c:1213
0x965f50 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../gcc/gcc/gimplify.c:7503
0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**)
../../gcc/gcc/gimplify.c:5709
0x96a821 gimplify_body(tree_node*, bool)
../../gcc/gcc/gimplify.c:8366
0x96acb6 gimplify_function_tree(tree_node*)
../../gcc/gcc/gimplify.c:8498
0x802f37 analyze_function
../../gcc/gcc/cgraphunit.c:636
0x804224 analyze_functions
../../gcc/gcc/cgraphunit.c:1002
0x805739 finalize_compilation_unit()
../../gcc/gcc/cgraphunit.c:2260
0x618920 cp_write_global_declarations()
../../gcc/gcc/cp/decl2.c:4365
Please submit a full bug report, [etc.]