------- Comment #2 from davek at gcc dot gnu dot org 2009-09-19 09:33 ------- This is where the subsequently-undefined reference is being generated:
Will ignore next 72 crossings of breakpoint 1. Continuing. Hardware watchpoint 1: {<data variable, no debug info>} 14169456 Old value = 73 New value = 74 0x004c5fe2 in mem_loc_descriptor () (gdb) bt #0 0x004c5fe2 in mem_loc_descriptor () #1 0x004c6926 in loc_descriptor () #2 0x004c9e43 in add_location_or_const_value_attribute.clone.13 () #3 0x004caa5b in gen_variable_die () #4 0x004d250d in gen_decl_die () #5 0x004d726e in decls_for_scope () #6 0x004d3d05 in gen_subprogram_die () #7 0x004d27c0 in gen_decl_die () #8 0x0082586f in rest_of_handle_final () #9 0x00604685 in execute_one_pass () #10 0x006048ec in execute_pass_list () #11 0x006048ff in execute_pass_list () #12 0x006048ff in execute_pass_list () #13 0x007fbe60 in tree_rest_of_compilation () #14 0x0060774d in cgraph_expand_function () #15 0x00609861 in cgraph_finalize_compilation_unit () #16 0x0041f9db in c_write_global_declarations () #17 0x0063267c in toplev_main () #18 0x00496820 in main () (gdb) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41404