------- Comment #44 from pluto at agmk dot net 2008-09-25 13:20 ------- i can reproduce this internal error on both 4.3.1 and 4.3-head. here's a backtrace:
Breakpoint 1, error_recursion (context=0x10aeb40) at ../../gcc-4_3-branch/gcc/diagnostic.c:637 637 if (context->lock < 3) (gdb) p *context $1 = { printer = 0x112dc10, diagnostic_count = {0, 0, 0, 2, 0, 0, 0, 0, 0, 0}, issue_warnings_are_errors_message = 1 '\001', warning_as_error_requested = 0 '\0', classify_diagnostic = '\0' <repeats 764 times>, show_option_requested = 0 '\0', abort_on_error = 0 '\0', begin_diagnostic = 0x471f0c <cp_diagnostic_starter>, end_diagnostic = 0x471f55 <cp_diagnostic_finalizer>, internal_error = 0, last_function = 0x0, last_module = 0, lock = 2 } (gdb) bt #0 error_recursion (context=0x10aeb40) at ../../gcc-4_3-branch/gcc/diagnostic.c:637 #1 0x00000000005bbf84 in diagnostic_report_diagnostic (context=0x10aeb40, diagnostic=0x7fff28b41dd0) at ../../gcc-4_3-branch/gcc/diagnostic.c:363 #2 0x00000000005bcc7a in internal_error (gmsgid=0xc2a3e7 "in %s, at %s:%d") at ../../gcc-4_3-branch/gcc/diagnostic.c:606 #3 0x00000000005bcdfe in fancy_abort (file=0xbe1418 "../../gcc-4_3-branch/gcc/cp/pt.c", line=15585, function=0xbe60f0 "dependent_type_p") at ../../gcc-4_3-branch/gcc/diagnostic.c:660 #4 0x0000000000452025 in dependent_type_p (type=0x7fa41a45acc0) at ../../gcc-4_3-branch/gcc/cp/pt.c:15585 #5 0x0000000000495f83 in cxx_sizeof_or_alignof_type (type=0x7fa41a45acc0, op=250, complain=1 '\001') at ../../gcc-4_3-branch/gcc/cp/typeck.c:1289 #6 0x0000000000447db8 in tsubst_copy_and_build (t=0x7fa41a443b80, args=0x7fa41a459b40, complain=tf_none, in_decl=0x0, function_p=0 '\0', integral_constant_expression_p=1 '\001') at ../../gcc-4_3-branch/gcc/cp/pt.c:10887 #7 0x000000000046d656 in count_non_default_template_args (args=0x7fa41a459b40, params=0x7fa41a443c00) at ../../gcc-4_3-branch/gcc/cp/error.c:172 #8 0x000000000046fd64 in dump_template_parms (info=0x7fa41a45b750, primary=0, flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:1343 #9 0x000000000046e387 in dump_aggr_type (t=0x7fa41a45ae40, flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:548 #10 0x000000000046dba5 in dump_type (t=0x7fa41a45ae40, flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:342 #11 0x000000000046f80a in dump_function_decl (t=0x7fa41a45c480, flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:1162 #12 0x000000000046f0e7 in dump_decl (t=0x7fa41a4a0b60, flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:947 #13 0x000000000047199b in decl_as_string (decl=0x7fa41a4a0b60, flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:2220 #14 0x00000000004719ca in lang_decl_name (decl=0x7fa41a4a0b60, v=2) at ../../gcc-4_3-branch/gcc/cp/error.c:2230 #15 0x00000000004bfbc9 in cxx_printable_name (decl=0x7fa41a4a0b60, v=2) at ../../gcc-4_3-branch/gcc/cp/tree.c:1207 #16 0x0000000000472143 in cp_print_error_function (context=0x10aeb40, diagnostic=0x7fff28b42670) at ../../gcc-4_3-branch/gcc/cp/error.c:2471 #17 0x0000000000471f32 in cp_diagnostic_starter (context=0x10aeb40, diagnostic=0x7fff28b42670) at ../../gcc-4_3-branch/gcc/cp/error.c:2424 #18 0x00000000005bc1b3 in diagnostic_report_diagnostic (context=0x10aeb40, diagnostic=0x7fff28b42670) at ../../gcc-4_3-branch/gcc/diagnostic.c:421 #19 0x00000000005bcc7a in internal_error (gmsgid=0xc2a3e7 "in %s, at %s:%d") at ../../gcc-4_3-branch/gcc/diagnostic.c:606 #20 0x00000000005bcdfe in fancy_abort (file=0xbe1418 "../../gcc-4_3-branch/gcc/cp/pt.c", line=15585, function=0xbe60f0 "dependent_type_p") at ../../gcc-4_3-branch/gcc/diagnostic.c:660 #21 0x0000000000452025 in dependent_type_p (type=0x7fa41a45acc0) at ../../gcc-4_3-branch/gcc/cp/pt.c:15585 #22 0x0000000000495f83 in cxx_sizeof_or_alignof_type (type=0x7fa41a45acc0, op=250, complain=1 '\001') at ../../gcc-4_3-branch/gcc/cp/typeck.c:1289 #23 0x0000000000447db8 in tsubst_copy_and_build (t=0x7fa41a443b80, args=0x7fa41a459b40, complain=tf_none, in_decl=0x0, function_p=0 '\0', integral_constant_expression_p=1 '\001') at ../../gcc-4_3-branch/gcc/cp/pt.c:10887 #24 0x000000000046d656 in count_non_default_template_args (args=0x7fa41a459b40, params=0x7fa41a443c00) at ../../gcc-4_3-branch/gcc/cp/error.c:172 #25 0x000000000046fd64 in dump_template_parms (info=0x7fa41a45b750, primary=0, flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:1343 #26 0x000000000046e387 in dump_aggr_type (t=0x7fa41a45ae40, flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:548 #27 0x000000000046dba5 in dump_type (t=0x7fa41a45ae40, flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:342 #28 0x000000000046f80a in dump_function_decl (t=0x7fa41a45c480, flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:1162 #29 0x000000000046f0e7 in dump_decl (t=0x7fa41a4a0b60, flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:947 #30 0x000000000047199b in decl_as_string (decl=0x7fa41a4a0b60, flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:2220 #31 0x00000000004719ca in lang_decl_name (decl=0x7fa41a4a0b60, v=2) at ../../gcc-4_3-branch/gcc/cp/error.c:2230 #32 0x00000000004bfbc9 in cxx_printable_name (decl=0x7fa41a4a0b60, v=2) at ../../gcc-4_3-branch/gcc/cp/tree.c:1207 #33 0x0000000000472143 in cp_print_error_function (context=0x10aeb40, diagnostic=0x7fff28b42f10) at ../../gcc-4_3-branch/gcc/cp/error.c:2471 #34 0x0000000000471f32 in cp_diagnostic_starter (context=0x10aeb40, diagnostic=0x7fff28b42f10) at ../../gcc-4_3-branch/gcc/cp/error.c:2424 #35 0x00000000005bc1b3 in diagnostic_report_diagnostic (context=0x10aeb40, diagnostic=0x7fff28b42f10) at ../../gcc-4_3-branch/gcc/diagnostic.c:421 #36 0x00000000005bcc7a in internal_error (gmsgid=0xc2a3e7 "in %s, at %s:%d") at ../../gcc-4_3-branch/gcc/diagnostic.c:606 #37 0x00000000005bcdfe in fancy_abort (file=0xbe1418 "../../gcc-4_3-branch/gcc/cp/pt.c", line=15585, function=0xbe60f0 "dependent_type_p") at ../../gcc-4_3-branch/gcc/diagnostic.c:660 #38 0x0000000000452025 in dependent_type_p (type=0x7fa41a45acc0) at ../../gcc-4_3-branch/gcc/cp/pt.c:15585 #39 0x0000000000495f83 in cxx_sizeof_or_alignof_type (type=0x7fa41a45acc0, op=250, complain=1 '\001') at ../../gcc-4_3-branch/gcc/cp/typeck.c:1289 #40 0x0000000000447db8 in tsubst_copy_and_build (t=0x7fa41a443b80, args=0x7fa41a459b40, complain=tf_none, in_decl=0x0, function_p=0 '\0', integral_constant_expression_p=1 '\001') at ../../gcc-4_3-branch/gcc/cp/pt.c:10887 #41 0x000000000046d656 in count_non_default_template_args (args=0x7fa41a459b40, params=0x7fa41a443c00) at ../../gcc-4_3-branch/gcc/cp/error.c:172 #42 0x000000000046fd64 in dump_template_parms (info=0x7fa41a45b750, primary=0, flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:1343 #43 0x000000000046e387 in dump_aggr_type (t=0x7fa41a45ae40, flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:548 #44 0x000000000046dba5 in dump_type (t=0x7fa41a45ae40, flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:342 #45 0x000000000046f80a in dump_function_decl (t=0x7fa41a45c480, flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:1162 #46 0x000000000046f0e7 in dump_decl (t=0x7fa41a4a0b60, flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:947 #47 0x000000000047199b in decl_as_string (decl=0x7fa41a4a0b60, flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:2220 #48 0x00000000004719ca in lang_decl_name (decl=0x7fa41a4a0b60, v=2) at ../../gcc-4_3-branch/gcc/cp/error.c:2230 #49 0x00000000004bfbc9 in cxx_printable_name (decl=0x7fa41a4a0b60, v=2) at ../../gcc-4_3-branch/gcc/cp/tree.c:1207 #50 0x0000000000446174 in tsubst_expr (t=0x7fa41a462580, args=0x7fa41a2a68a0, complain=tf_warning_or_error, in_decl=0x7fa41a45c480, integral_constant_expression_p=0 '\0') at ../../gcc-4_3-branch/gcc/cp/pt.c:10291 #51 0x0000000000445dee in tsubst_expr (t=0x7fa41a4151b0, args=0x7fa41a2a68a0, complain=tf_warning_or_error, in_decl=0x7fa41a45c480, integral_constant_expression_p=0 '\0') at ../../gcc-4_3-branch/gcc/cp/pt.c:10217 #52 0x0000000000446613 in tsubst_expr (t=0x7fa41a406b90, args=0x7fa41a2a68a0, complain=tf_warning_or_error, in_decl=0x7fa41a45c480, integral_constant_expression_p=0 '\0') at ../../gcc-4_3-branch/gcc/cp/pt.c:10374 #53 0x0000000000450ffb in instantiate_decl (d=0x7fa41a4a0b60, defer_ok=0, expl_inst_class_mem_p=0 '\0') at ../../gcc-4_3-branch/gcc/cp/pt.c:15040 #54 0x0000000000451264 in instantiate_pending_templates (retries=0) at ../../gcc-4_3-branch/gcc/cp/pt.c:15138 #55 0x000000000046c4e3 in cp_write_global_declarations () at ../../gcc-4_3-branch/gcc/cp/decl2.c:3331 #56 0x000000000077b6ff in compile_file () at ../../gcc-4_3-branch/gcc/toplev.c:1055 #57 0x000000000077d142 in do_compile () at ../../gcc-4_3-branch/gcc/toplev.c:2240 #58 0x000000000077d1a6 in toplev_main (argc=13, argv=0x7fff28b43e78) at ../../gcc-4_3-branch/gcc/toplev.c:2272 #59 0x000000000052ed37 in main (argc=13, argv=0x7fff28b43e78) at ../../gcc-4_3-branch/gcc/main.c:35 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14912