For google/gcc-4_6 branch. Fix bug where we were outputting a garbage value for the index operand of DW_OP_GNU_addr_index.
Tested: incremental remake in GCC build directory and hand tested. 2012-03-20 Cary Coutant <ccout...@google.com> * dwarf2out.c (size_of_loc_descr): Use val_index instead of v.val_unsigned. (output_loc_operands): Likewise. Index: dwarf2out.c =================================================================== --- dwarf2out.c (revision 185585) +++ dwarf2out.c (working copy) @@ -4902,7 +4902,7 @@ size_of_loc_descr (dw_loc_descr_ref loc) size += DWARF2_ADDR_SIZE; break; case DW_OP_GNU_addr_index: - size += size_of_uleb128 (loc->dw_loc_oprnd1.v.val_unsigned); + size += size_of_uleb128 (loc->dw_loc_oprnd1.val_index); break; case DW_OP_const1u: case DW_OP_const1s: @@ -5283,7 +5283,7 @@ output_loc_operands (dw_loc_descr_ref lo break; case DW_OP_GNU_addr_index: - dw2_asm_output_data_uleb128 (loc->dw_loc_oprnd1.v.val_unsigned, + dw2_asm_output_data_uleb128 (loc->dw_loc_oprnd1.val_index, "(address index)"); break; -- This patch is available for review at http://codereview.appspot.com/5866047