dwarf2out.c (resolve_variable_value_in_expr): Lookup DIE just generated.
authorRichard Biener <rguenther@suse.de>
Tue, 16 May 2017 10:58:54 +0000 (10:58 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 16 May 2017 10:58:54 +0000 (10:58 +0000)
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.

From-SVN: r248093

gcc/ChangeLog
gcc/dwarf2out.c

index 1ce36a7425ff14edd93b5a1e5156620e8a4bc231..a974a8d2ad1d33176f2ab3129217d2c6099d0542 100644 (file)
@@ -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
index 98c51576ec2ac43e6d5f13613ee2aa9713ba651a..87530eec7149dc2710459f87fd12f34c7c9abe2c 100644 (file)
@@ -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)