This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/59832] New: [c++11][4.8, 4.9] ICE in reshape_init_class with initializer list
- From: "ppluzhnikov at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 15 Jan 2014 17:14:44 +0000
- Subject: [Bug c++/59832] New: [c++11][4.8, 4.9] ICE in reshape_init_class with initializer list
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59832
Bug ID: 59832
Summary: [c++11][4.8, 4.9] ICE in reshape_init_class with
initializer list
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ppluzhnikov at google dot com
Google ref b/12545403
/// -- cut ---
struct A
{
struct B
{
int aa;
int bb;
};
B cc;
};
void Fn1 (const A &);
void
Fn2 ()
{
Fn1 ( { { bb: 0 } });
}
/// -- cut ---
Using trunk:
g++ (GCC) 4.9.0 20140110 (experimental)
g++ -c -g -std=c++11 t.ii
t.ii: In function âvoid Fn2()â:
t.ii:16:22: internal compiler error: in reshape_init_class, at cp/decl.c:5267
Fn1 ( { { bb: 0 } });
^
0x56de5d reshape_init_class
../../gcc/cp/decl.c:5267
0x56de5d reshape_init_r
../../gcc/cp/decl.c:5493
0x56d026 reshape_init(tree_node*, tree_node*, int)
../../gcc/cp/decl.c:5537
0x55364f build_aggr_conv
../../gcc/cp/call.c:885
0x55364f implicit_conversion
../../gcc/cp/call.c:1757
0x5587d6 can_convert_arg(tree_node*, tree_node*, tree_node*, int, int)
../../gcc/cp/call.c:8948
0x5536e5 build_aggr_conv
../../gcc/cp/call.c:910
0x5536e5 implicit_conversion
../../gcc/cp/call.c:1757
0x554041 reference_binding
../../gcc/cp/call.c:1464
0x552e5c implicit_conversion
../../gcc/cp/call.c:1698
0x555112 add_function_candidate
../../gcc/cp/call.c:2002
0x551836 add_candidates
../../gcc/cp/call.c:5094
0x558b82 perform_overload_resolution
../../gcc/cp/call.c:3819
0x55f68a build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, bool, int)
../../gcc/cp/call.c:3896
0x6d9711 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
../../gcc/cp/semantics.c:2281
0x65c73e cp_parser_postfix_expression
../../gcc/cp/parser.c:6171
0x65f418 cp_parser_unary_expression
../../gcc/cp/parser.c:7177
0x6600af cp_parser_binary_expression
../../gcc/cp/parser.c:7881
0x6605a1 cp_parser_assignment_expression
../../gcc/cp/parser.c:8119
0x662534 cp_parser_expression
../../gcc/cp/parser.c:8281
Please submit a full bug report,
Without -std=c++11, same crash after warning:
g++ -c -g t.ii
t.ii: In function âvoid Fn2()â:
t.ii:16:7: warning: extended initializer lists only available with -std=c++11
or -std=gnu++11 [enabled by default]
Fn1 ( { { bb: 0 } });
^
t.ii:16:22: warning: extended initializer lists only available with -std=c++11
or -std=gnu++11 [enabled by default]
Fn1 ( { { bb: 0 } });
^
t.ii:16:22: internal compiler error: in reshape_init_class, at cp/decl.c:5267
0x56de5d reshape_init_class
../../gcc/cp/decl.c:5267
...