diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-03-04 08:27:15 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-03-04 08:27:15 +0100 |
commit | f10cdc6c1436bcd59038a8c84128c1fe53f235c4 (patch) | |
tree | b94ce8cb28ddbc2f62b98257bd133dd3014e1be7 /gcc/dwarf2out.c | |
parent | b47d1d904d5397a61bba40fba095f02bd00f04c1 (diff) | |
download | gcc-f10cdc6c1436bcd59038a8c84128c1fe53f235c4.zip gcc-f10cdc6c1436bcd59038a8c84128c1fe53f235c4.tar.gz gcc-f10cdc6c1436bcd59038a8c84128c1fe53f235c4.tar.bz2 |
re PR debug/69947 (DW_OP_GNU_implicit_pointer broken on the trunk)
PR debug/69947
* dwarf2out.c (prune_unused_types_walk_loc_descr): Handle
all other ops that have dw_val_class_die_ref operands,
and DW_OP_GNU_entry_value.
* gcc.dg/guality/pr69947.c: New test.
From-SVN: r233958
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index a8c21d8..6d5e3f5 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -25641,11 +25641,29 @@ prune_unused_types_walk_loc_descr (dw_loc_descr_ref loc) for (; loc != NULL; loc = loc->dw_loc_next) switch (loc->dw_loc_opc) { + case DW_OP_GNU_implicit_pointer: + case DW_OP_GNU_convert: + case DW_OP_GNU_reinterpret: + if (loc->dw_loc_oprnd1.val_class == dw_val_class_die_ref) + prune_unused_types_mark (loc->dw_loc_oprnd1.v.val_die_ref.die, 1); + break; case DW_OP_call2: case DW_OP_call4: case DW_OP_call_ref: + case DW_OP_GNU_const_type: + case DW_OP_GNU_parameter_ref: + gcc_assert (loc->dw_loc_oprnd1.val_class == dw_val_class_die_ref); prune_unused_types_mark (loc->dw_loc_oprnd1.v.val_die_ref.die, 1); break; + case DW_OP_GNU_regval_type: + case DW_OP_GNU_deref_type: + gcc_assert (loc->dw_loc_oprnd2.val_class == dw_val_class_die_ref); + prune_unused_types_mark (loc->dw_loc_oprnd2.v.val_die_ref.die, 1); + break; + case DW_OP_GNU_entry_value: + gcc_assert (loc->dw_loc_oprnd1.val_class == dw_val_class_loc); + prune_unused_types_walk_loc_descr (loc->dw_loc_oprnd1.v.val_loc); + break; default: break; } |