dwarf2out.c (loc_list_from_tree_1): Do not create DW_OP_GNU_variable_value for DECL_I...
authorRichard Biener <rguenther@suse.de>
Tue, 16 May 2017 11:00:59 +0000 (11:00 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 16 May 2017 11:00:59 +0000 (11:00 +0000)
2017-05-16  Richard Biener  <rguenther@suse.de>

* dwarf2out.c (loc_list_from_tree_1): Do not create
DW_OP_GNU_variable_value for DECL_IGNORED_P decls.

From-SVN: r248094

gcc/ChangeLog
gcc/dwarf2out.c

index a974a8d2ad1d33176f2ab3129217d2c6099d0542..7063760cf59355b2535a5d1e3faddbba5b7c6ae6 100644 (file)
@@ -1,3 +1,8 @@
+2017-05-16  Richard Biener  <rguenther@suse.de>
+
+       * dwarf2out.c (loc_list_from_tree_1): Do not create
+       DW_OP_GNU_variable_value for DECL_IGNORED_P decls.
+
 2017-05-16  Richard Biener  <rguenther@suse.de>
 
        * dwarf2out.c (resolve_variable_value_in_expr): Lookup DIE
index 87530eec7149dc2710459f87fd12f34c7c9abe2c..5ff45eb4efdc611ec38621fcb4872e4c227d7b1f 100644 (file)
@@ -17373,6 +17373,7 @@ loc_list_from_tree_1 (tree loc, int want_address,
                && early_dwarf
                && current_function_decl
                && want_address != 1
+               && ! DECL_IGNORED_P (loc)
                && (INTEGRAL_TYPE_P (TREE_TYPE (loc))
                    || POINTER_TYPE_P (TREE_TYPE (loc)))
                && DECL_CONTEXT (loc) == current_function_decl