From 88f2e16bb28fb750679c6c2b24e0ff3e0ab73f26 Mon Sep 17 00:00:00 2001 From: jakub Date: Sat, 3 Dec 2011 16:39:56 +0000 Subject: 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 --- gcc/cfgexpand.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gcc/cfgexpand.c') diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index e5a7a392eb4..15e8231ca72 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -3325,7 +3325,8 @@ expand_debug_expr (tree exp) if ((TREE_CODE (TREE_OPERAND (exp, 0)) == VAR_DECL || TREE_CODE (TREE_OPERAND (exp, 0)) == PARM_DECL || TREE_CODE (TREE_OPERAND (exp, 0)) == RESULT_DECL) - && !TREE_ADDRESSABLE (TREE_OPERAND (exp, 0))) + && (!TREE_ADDRESSABLE (TREE_OPERAND (exp, 0)) + || target_for_debug_bind (TREE_OPERAND (exp, 0)))) return gen_rtx_DEBUG_IMPLICIT_PTR (mode, TREE_OPERAND (exp, 0)); if (handled_component_p (TREE_OPERAND (exp, 0))) @@ -3337,7 +3338,8 @@ expand_debug_expr (tree exp) if ((TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == PARM_DECL || TREE_CODE (decl) == RESULT_DECL) - && !TREE_ADDRESSABLE (decl) + && (!TREE_ADDRESSABLE (decl) + || target_for_debug_bind (decl)) && (bitoffset % BITS_PER_UNIT) == 0 && bitsize > 0 && bitsize == maxsize) -- cgit v1.2.1