diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-12-03 17:39:56 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-12-03 17:39:56 +0100 |
commit | f8cca67b9c954eca6540832ad88c6ddeb30cbaeb (patch) | |
tree | 1c54a346df5ae59f2f23d251a7bb9830f3367d17 /gcc/cfgexpand.c | |
parent | a8028a3ee823ad31d8aecfa610c99af3da92c4ea (diff) | |
download | gcc-f8cca67b9c954eca6540832ad88c6ddeb30cbaeb.zip gcc-f8cca67b9c954eca6540832ad88c6ddeb30cbaeb.tar.gz gcc-f8cca67b9c954eca6540832ad88c6ddeb30cbaeb.tar.bz2 |
re PR debug/50317 (missing DW_OP_GNU_implicit_pointer)
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.
From-SVN: r181971
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index e5a7a39..15e8231 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) |