diff options
author | Richard Biener <rguenther@suse.de> | 2017-05-16 10:58:54 +0000 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2017-05-16 10:58:54 +0000 |
commit | 4884e86a1f822f72211dfc66eb662c4c22213c6a (patch) | |
tree | 10b02cfa8985e61fb970b17b696b5407aaf1e816 | |
parent | 33c5931ec3c2bc5ab56013b6638167619b88fa36 (diff) |
2017-05-16 Richard Biener <rguenther@suse.de>
* dwarf2out.c (resolve_variable_value_in_expr): Lookup DIE
just generated.
(note_variable_value_in_expr): If we resolved the decl ref
do not push to the stack.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@248093 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1ce36a7425f..a974a8d2ad1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-05-16 Richard Biener <rguenther@suse.de> + + * dwarf2out.c (resolve_variable_value_in_expr): Lookup DIE + just generated. + (note_variable_value_in_expr): If we resolved the decl ref + do not push to the stack. + 2017-05-16 Matthew Wahab <matthew.wahab@arm.com> * config/arm/arm_neon.h (vadd_f16): Use standard arithmetic diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 98c51576ec2..87530eec714 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -30109,8 +30109,9 @@ resolve_variable_value_in_expr (dw_attr_node *a, dw_loc_descr_ref loc) break; } /* Create DW_TAG_variable that we can refer to. */ - ref = gen_decl_die (decl, NULL_TREE, NULL, - lookup_decl_die (current_function_decl)); + gen_decl_die (decl, NULL_TREE, NULL, + lookup_decl_die (current_function_decl)); + ref = lookup_decl_die (decl); if (ref) { loc->dw_loc_oprnd1.val_class = dw_val_class_die_ref; @@ -30203,6 +30204,7 @@ note_variable_value_in_expr (dw_die_ref die, dw_loc_descr_ref loc) loc->dw_loc_oprnd1.val_class = dw_val_class_die_ref; loc->dw_loc_oprnd1.v.val_die_ref.die = ref; loc->dw_loc_oprnd1.v.val_die_ref.external = 0; + continue; } if (VAR_P (decl) && DECL_CONTEXT (decl) |