The comment in address_of_int_loc_descriptor doesn't make a lot of sense to me. In any case of a value no larger than address size, you can use DW_OP_stack_value to get the same size or smaller. When the size is the same, such as DW_OP_implicit_value(address-sized block) vs DW_OP_addr(address-consant) DW_OP_stack_value (both address-size + 2 bytes), I think DW_OP_stack_value is preferable because consumers do not have to involve overly-general variable-sized-stuff-with-relocs logic that the general case of constant blocks involves. There is no need for a DW_OP_{bit_,}piece in these cases when the expressed value is in the low bits of the value computed on the stack.
http://gcc.gnu.org/ml/gcc-patches/2009-09/msg01602.html
Subject: Bug 41439 Author: jakub Date: Wed Sep 23 18:07:07 2009 New Revision: 152091 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152091 Log: PR debug/41439 * dwarf2out.c (address_of_int_loc_descriptor): Don't emit DW_OP_piece after DW_OP_stack_value, adjust size calculations for it, when DW_OP_stack_value and DW_OP_implicit_value has the same size, prefer DW_OP_stack_value. (loc_descriptor, loc_list_for_address_of_addr_expr_of_indirect_ref, loc_list_from_tree): Don't emit DW_OP_piece after DW_OP_stack_value. Modified: trunk/gcc/ChangeLog trunk/gcc/dwarf2out.c
Fixed.