https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122968

--- Comment #3 from Ben Woodard <woodard at redhat dot com> ---
In DWARF6 it would probably be better to have locations like:

for x_var:
DW_OP_fbreg: -16
DW_OP_deref
DW_OP_deref_size: 1
DW_OP_lit0
DW_OP_bit_offset

and for y_var:
DW_OP_fbreg: -16
DW_OP_deref
DW_OP_deref_size: 1
DW_OP_lit3
DW_OP_bit_offset

since that would give a read/write location rather than using DW_OP_bit_piece
which would just copy the bits of the value to composite storage making it RO.

That of course would need to be combined with having DW_AT_bit_size and 
DW_AT_data_bit_offset applied to variables not just types and members.

Reply via email to