diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-03 16:39:56 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-03 16:39:56 +0000 |
commit | 88f2e16bb28fb750679c6c2b24e0ff3e0ab73f26 (patch) | |
tree | 1c54a346df5ae59f2f23d251a7bb9830f3367d17 /gcc/tree-ssa.c | |
parent | 4f6cadc51f13c6da8748a5a2eff042d468661082 (diff) | |
download | gcc-88f2e16bb28fb750679c6c2b24e0ff3e0ab73f26.tar.gz |
PR debug/50317
* tree-ssa.c (target_for_debug_bind): Also allow is_gimple_reg_type
vars that aren't referenced.
(tree-ssa-live.c (remove_unused_locals): Don't clear TREE_ADDRESSABLE
of unreferenced local vars.
* cfgexpand.c (expand_debug_expr): For DEBUG_IMPLICIT_PTR allow also
TREE_ADDRESSABLE vars that satisfy target_for_debug_bind.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181971 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r-- | gcc/tree-ssa.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 97857217ce7..8485af0a165 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -264,7 +264,12 @@ target_for_debug_bind (tree var) return NULL_TREE; if (!is_gimple_reg (var)) - return NULL_TREE; + { + if (is_gimple_reg_type (TREE_TYPE (var)) + && referenced_var_lookup (cfun, DECL_UID (var)) == NULL_TREE) + return var; + return NULL_TREE; + } return var; } |