summaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2016-03-04 07:27:15 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2016-03-04 07:27:15 +0000
commit290da96e60e757b6283d4534621da6a730f16777 (patch)
treeb94ce8cb28ddbc2f62b98257bd133dd3014e1be7 /gcc/dwarf2out.c
parent8fdb7e3c57ef06d40fa8349c6c6af2443e2e3662 (diff)
downloadgcc-290da96e60e757b6283d4534621da6a730f16777.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233958 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index a8c21d809ce..6d5e3f540f5 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;
}