------- Comment #4 from davek at gcc dot gnu dot org 2009-09-19 09:44 ------- Fortunately it even happens when using the stage1 compiler, which has usable debug info:
(gdb) c 73 Will ignore next 72 crossings of breakpoint 1. Continuing. Hardware watchpoint 1: dw2_string_counter Old value = 73 New value = 74 gen_label_for_indirect_string (node=0x7ee82980) at /gnu/gcc/gcc-unpatched/gcc/dwarf2out.c:6849 6849 node->label = xstrdup (label); (gdb) bt #0 gen_label_for_indirect_string (node=0x7ee82980) at /gnu/gcc/gcc-unpatched/gcc/dwarf2out.c:6849 #1 0x007b00f3 in get_debug_string_label (str=0x7f15d578 "goto") at /gnu/gcc/gcc-unpatched/gcc/dwarf2out.c:6862 #2 0x007b9d00 in mem_loc_descriptor (rtl=0x7f23f420, mode=VOIDmode, initialized=VAR_INIT_STATUS_INITIALIZED) at /gnu/gcc/gcc-unpatched/gcc/dwarf2out.c:11610 #3 0x007ba7ba in loc_descriptor (rtl=0x7f23f420, mode=SImode, initialized=VAR_INIT_STATUS_INITIALIZED) at /gnu/gcc/gcc-unpatched/gcc/dwarf2out.c:11968 #4 0x007ba0a5 in loc_descriptor (rtl=0x7ebdd810, mode=SImode, initialized=VAR_INIT_STATUS_INITIALIZED) at /gnu/gcc/gcc-unpatched/gcc/dwarf2out.c:11742 #5 0x007bfd60 in add_location_or_const_value_attribute (die=0x7ef9fb58, decl=0x7f004bc0, attr=DW_AT_location) at /gnu/gcc/gcc-unpatched/gcc/dwarf2out.c:13769 #6 0x007c7ea8 in gen_variable_die (decl=0x7f004bc0, origin=0x0, context_die=0x7ef9c940) at /gnu/gcc/gcc-unpatched/gcc/dwarf2out.c:16129 #7 0x007ccb2b in gen_decl_die (decl=0x7f004bc0, origin=0x0, context_die=0x7ef9c940) at /gnu/gcc/gcc-unpatched/gcc/dwarf2out.c:17388 #8 0x007cb12d in process_scope_var (stmt=0x7f01a020, decl=0x7f004bc0, origin=0x0, context_die=0x7ef9c940) at /gnu/gcc/gcc-unpatched/gcc/dwarf2out.c:16990 #9 0x007cb1b0 in decls_for_scope (stmt=0x7f01a020, context_die=0x7ef9c940, depth=0) at /gnu/gcc/gcc-unpatched/gcc/dwarf2out.c:17012 #10 0x007c6df5 in gen_subprogram_die (decl=0x7f6af500, context_die=0x7fcb3f00) at /gnu/gcc/gcc-unpatched/gcc/dwarf2out.c:15853 #11 0x007cc80f in gen_decl_die (decl=0x7f6af500, origin=0x0, context_die=0x7fcb3f00) at /gnu/gcc/gcc-unpatched/gcc/dwarf2out.c:17323 #12 0x007cd881 in dwarf2out_decl (decl=0x7f6af500) at /gnu/gcc/gcc-unpatched/gcc/dwarf2out.c:17694 #13 0x013c68a5 in rest_of_handle_final () at /gnu/gcc/gcc-unpatched/gcc/final.c:4284 #14 0x00b9de10 in execute_one_pass (pass=0x24668e0) at /gnu/gcc/gcc-unpatched/gcc/passes.c:1295 #15 0x00b9dfb0 in execute_pass_list (pass=0x24668e0) at /gnu/gcc/gcc-unpatched/gcc/passes.c:1344 #16 0x00b9dfcc in execute_pass_list (pass=0x2464680) at /gnu/gcc/gcc-unpatched/gcc/passes.c:1345 #17 0x00b9dfcc in execute_pass_list (pass=0x2464640) at /gnu/gcc/gcc-unpatched/gcc/passes.c:1345 #18 0x012dfc0a in tree_rest_of_compilation (fndecl=0x7f6af500) at /gnu/gcc/gcc-unpatched/gcc/tree-optimize.c:389 #19 0x00bbfccc in cgraph_expand_function (node=0x7f108b00) at /gnu/gcc/gcc-unpatched/gcc/cgraphunit.c:1158 #20 0x00bbfe89 in cgraph_expand_all_functions () at /gnu/gcc/gcc-unpatched/gcc/cgraphunit.c:1217 #21 0x00bc0452 in cgraph_optimize () at /gnu/gcc/gcc-unpatched/gcc/cgraphunit.c:1440 #22 0x00bbf9a9 in cgraph_finalize_compilation_unit () at /gnu/gcc/gcc-unpatched/gcc/cgraphunit.c:1087 #23 0x00479c29 in c_write_global_declarations () at /gnu/gcc/gcc-unpatched/gcc/c-decl.c:9361 #24 0x00db0ca4 in compile_file () at /gnu/gcc/gcc-unpatched/gcc/toplev.c:1050 #25 0x00db2cbe in do_compile () at /gnu/gcc/gcc-unpatched/gcc/toplev.c:2382 #26 0x00db2d8c in toplev_main (argc=32, argv=0x8079df0) at /gnu/gcc/gcc-unpatched/gcc/toplev.c:2424 #27 0x006281ed in main (argc=32, argv=0x8079df0) at /gnu/gcc/gcc-unpatched/gcc/main.c:35 (gdb) (gdb) print node[0] $1 = {str = 0x7f23fe18 "goto", refcount = 1, form = 0, label = 0x0} (gdb) (gdb) up #1 0x007b00f3 in get_debug_string_label (str=0x7f15d578 "goto") at /gnu/gcc/gcc-unpatched/gcc/dwarf2out.c:6862 6862 gen_label_for_indirect_string (node); (gdb) up #2 0x007b9d00 in mem_loc_descriptor (rtl=0x7f23f420, mode=VOIDmode, initialized=VAR_INIT_STATUS_INITIALIZED) at /gnu/gcc/gcc-unpatched/gcc/dwarf2out.c:11610 11610 rtl = get_debug_string_label (XSTR (rtl, 0)); (gdb) call debug_rtx (rtl) (const_string:SI ("goto")) (gdb) That's a touch odd. ad...@ubik /gnu/gcc/gcc/gcc $ grep -w goto java/expr.c goto fail; ad...@ubik /gnu/gcc/gcc/gcc $ "goto fail" indeed. Why would a keyword end up as a debug info string? (preprocessed source on the way) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41404