This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47041] internal compiler error in build_data_member_initialization, add cp/semantics.c:5483
- From: "zsojka at seznam dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 7 Jan 2011 00:16:38 +0000
- Subject: [Bug c++/47041] internal compiler error in build_data_member_initialization, add cp/semantics.c:5483
- Auto-submitted: auto-generated
- References: <bug-47041-4@http.gcc.gnu.org/bugzilla/>
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 0x0000000000641dfe in build_data_member_initialization (t=<value optimized
out>, vec=0x7fffffffcfc8)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/semantics.c:5498
#2 0x000000000064249a in build_constexpr_constructor_member_initializers
(fun=0x7ffff5cce700, body=<value optimized out>)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/semantics.c:5570
#3 register_constexpr_fundef (fun=0x7ffff5cce700, body=<value optimized out>)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/semantics.c:5602
#4 0x0000000000530967 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 0x00000000006238db in synthesize_method (fndecl=0x7ffff5cce700)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/method.c:759
#7 0x00000000005b5ae3 in mark_used (decl=0x7ffff5cdf000) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/decl2.c:4272
#8 0x000000000050fd2e in build_over_call (cand=0x1940100, flags=11,
complain=3)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/call.c:6339
#9 0x000000000050ce6d in build_new_method_call (instance=0x7ffff7ec8930,
fns=0x7ffff5cd9800, 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 0x000000000050dd64 in build_special_member_call (instance=0x7ffff7ec8930,
name=<value optimized out>,
args=0x7fffffffd378, binfo=0x7ffff5cd64e0, flags=11, complain=3)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/call.c:6608
#11 0x000000000060cef3 in ocp_convert (type=0x7ffff5ccd540,
expr=0x7ffff5cc7630, convtype=0, flags=11)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/cvt.c:807
#12 0x00000000006007aa in check_return_expr (retval=<value optimized out>,
no_warning=0x7fffffffd43f "")
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/typeck.c:7775
#13 0x000000000062e58f in finish_return_stmt (expr=<value optimized out>)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/semantics.c:800
#14 0x00000000005ce3d2 in cp_parser_jump_statement (parser=0x7ffff5cdc108,
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=0x7ffff5cdc108, 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 0x00000000005ced46 in cp_parser_statement_seq_opt (parser=0x7ffff5cdc108,
in_statement_expr=0x0)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:8414
#17 0x00000000005cee7c in cp_parser_compound_statement (parser=0x7ffff5cdc108,
in_statement_expr=0x0,
in_try=<value optimized out>) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:8368
#18 0x00000000005e28dc in cp_parser_function_body (parser=0x7ffff5cdc108)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:16371
#19 cp_parser_ctor_initializer_opt_and_function_body (parser=0x7ffff5cdc108)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:16408
#20 0x00000000005e3052 in cp_parser_function_definition_after_declarator
(parser=0x7ffff5cdc108, inline_p=0 '\000')
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:19814
#21 0x00000000005e465c in
cp_parser_function_definition_from_specifiers_and_declarator
(parser=0x7ffff5cdc108,
decl_specifiers=0x7fffffffd740, checks=0x0, function_definition_allowed_p=1
'\001', member_p=0 '\000',
declares_class_or_enum=0, function_definition_p=0x7fffffffd7af
"\001\200\360\223\001")
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:19743
#22 cp_parser_init_declarator (parser=0x7ffff5cdc108,
decl_specifiers=0x7fffffffd740, checks=0x0,
function_definition_allowed_p=1 '\001', member_p=0 '\000',
declares_class_or_enum=0,
function_definition_p=0x7fffffffd7af "\001\200\360\223\001")
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:14518
#23 0x00000000005e987b in cp_parser_simple_declaration (parser=0x7ffff5cdc108,
function_definition_allowed_p=1 '\001')
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9689
#24 0x00000000005e9be7 in cp_parser_block_declaration (parser=0x7ffff5cdc108,
statement_p=0 '\000')
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9587
#25 cp_parser_block_declaration (parser=0x7ffff5cdc108, statement_p=0 '\000')
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9521
#26 0x00000000005ed8f2 in cp_parser_declaration (parser=0x7ffff5cdc108)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9492
#27 cp_parser_declaration (parser=0x7ffff5cdc108) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9399
#28 0x00000000005ec41a in cp_parser_declaration_seq_opt (parser=0x7ffff5cdc108)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9378
#29 0x00000000005edf69 in cp_parser_translation_unit () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:3461
#30 c_parse_file () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:25214
#31 0x00000000006c2195 in c_common_parse_file () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/c-family/c-opts.c:1071
#32 0x0000000000a24598 in compile_file (argc=15, argv=0x7fffffffda78)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/toplev.c:579
#33 do_compile (argc=15, argv=0x7fffffffda78) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/toplev.c:1874
#34 toplev_main (argc=15, argv=0x7fffffffda78) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/toplev.c:1937
#35 0x00007ffff6586bbd in __libc_start_main () from /lib/libc.so.6
#36 0x00000000004fef2d in _start ()
Tested revisions:
r168552 - crash
r165699 - OK
4.5 r168062 - OK
Probably regression from 4.5 (I can't edit the bug details).