[Bug c++/47041] internal compiler error in build_data_member_initialization, add cp/semantics.c:5483

2011-01-06 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47041

--- Comment #1 from Zdenek Sojka zsojka at seznam dot cz 2011-01-07 00:16:29 
UTC ---
Created attachment 22915
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=22915
reduced testcase

Probably the same issue.

$ gcc -fno-elide-constructors -std=c++0x pr47041.C 
pr47041.C: In constructor 'constexpr S::S(S)':
pr47041.C:1:8: internal compiler error: in build_data_member_initialization, at
cp/semantics.c:5498
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.

(gdb) bt
#0  fancy_abort (file=0x1224370
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/semantics.c, line=5498, 
function=0x12276a0 build_data_member_initialization) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/diagnostic.c:892
#1  0x00641dfe in build_data_member_initialization (t=value optimized
out, vec=0x7fffcfc8)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/semantics.c:5498
#2  0x0064249a in build_constexpr_constructor_member_initializers
(fun=0x75cce700, body=value optimized out)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/semantics.c:5570
#3  register_constexpr_fundef (fun=0x75cce700, body=value optimized out)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/semantics.c:5602
#4  0x00530967 in maybe_save_function_definition (flags=0)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/decl.c:12808
#5  finish_function (flags=0) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/decl.c:12927
#6  0x006238db in synthesize_method (fndecl=0x75cce700)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/method.c:759
#7  0x005b5ae3 in mark_used (decl=0x75cdf000) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/decl2.c:4272
#8  0x0050fd2e in build_over_call (cand=0x1940100, flags=11,
complain=3)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/call.c:6339
#9  0x0050ce6d in build_new_method_call (instance=0x77ec8930,
fns=0x75cd9800, args=value optimized out, 
conversion_path=value optimized out, flags=11, fn_p=0x0, complain=3)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/call.c:6916
#10 0x0050dd64 in build_special_member_call (instance=0x77ec8930,
name=value optimized out, 
args=0x7fffd378, binfo=0x75cd64e0, flags=11, complain=3)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/call.c:6608
#11 0x0060cef3 in ocp_convert (type=0x75ccd540,
expr=0x75cc7630, convtype=0, flags=11)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/cvt.c:807
#12 0x006007aa in check_return_expr (retval=value optimized out,
no_warning=0x7fffd43f )
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/typeck.c:7775
#13 0x0062e58f in finish_return_stmt (expr=value optimized out)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/semantics.c:800
#14 0x005ce3d2 in cp_parser_jump_statement (parser=0x75cdc108,
in_statement_expr=0x0, in_compound=1 '\001', 
if_p=value optimized out) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9194
#15 cp_parser_statement (parser=0x75cdc108, in_statement_expr=0x0,
in_compound=1 '\001', if_p=value optimized out)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:8080
#16 0x005ced46 in cp_parser_statement_seq_opt (parser=0x75cdc108,
in_statement_expr=0x0)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:8414
#17 0x005cee7c in cp_parser_compound_statement (parser=0x75cdc108,
in_statement_expr=0x0, 
in_try=value optimized out) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:8368
#18 0x005e28dc in cp_parser_function_body (parser=0x75cdc108)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:16371
#19 cp_parser_ctor_initializer_opt_and_function_body (parser=0x75cdc108)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:16408
#20 0x005e3052 in cp_parser_function_definition_after_declarator
(parser=0x75cdc108, inline_p=0 '\000')
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:19814
#21 0x005e465c in
cp_parser_function_definition_from_specifiers_and_declarator
(parser=0x75cdc108, 
decl_specifiers=0x7fffd740, checks=0x0, function_definition_allowed_p=1
'\001', member_p=0 '\000', 
declares_class_or_enum=0, function_definition_p=0x7fffd7af
\001\200\360\223\001)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:19743
#22 cp_parser_init_declarator (parser=0x75cdc108,
decl_specifiers=0x7fffd740, checks=0x0, 
function_definition_allowed_p=1 '\001', member_p=0 '\000',
declares_class_or_enum=0, 
function_definition_p=0x7fffd7af \001\200\360\223\001)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:14518
#23 0x005e987b in cp_parser_simple_declaration (parser=0x75cdc108,

[Bug c++/47041] internal compiler error in build_data_member_initialization, add cp/semantics.c:5483

2011-01-06 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47041

--- Comment #2 from Zdenek Sojka zsojka at seznam dot cz 2011-01-07 01:25:52 
UTC ---
Created attachment 22916
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=22916
even shorter testcase

$ gcc -std=c++0x -fno-elide-constructors pr47041-2.C 
pr47041-2.C: In constructor 'constexpr S::S(S)':
pr47041-2.C:1:8: internal compiler error: in build_data_member_initialization,
at cp/semantics.c:5498
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.