summaryrefslogtreecommitdiff
path: root/gcc/var-tracking.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-26 19:19:25 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-26 19:19:25 +0000
commit8afb7c4b8a5f9f158e32723a7cf0ed0f514ecea7 (patch)
tree007004e6f0b36e0efb8b580543d475b492da6928 /gcc/var-tracking.c
parent49ef567352f7f2a333589c6a4b906e3d8fc6950a (diff)
downloadgcc-8afb7c4b8a5f9f158e32723a7cf0ed0f514ecea7.tar.gz
PR debug/54970
* cfgexpand.c (expand_debug_expr): Expand &MEM_REF[&var, n] as DEBUG_IMPLICIT_PTR + n if &var expands to DEBUG_IMPLICIT_PTR. * tree-sra.c (create_access_replacement): Allow also MEM_REFs with ADDR_EXPR first operand in DECL_DEBUG_EXPR expressions. * var-tracking.c (track_expr_p): Handle MEM_REFs in DECL_DEBUG_EXPR expressions. * dwarf2out.c (add_var_loc_to_decl): Likewise. PR debug/54971 * gcc.dg/guality/pr54970.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192860 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/var-tracking.c')
-rw-r--r--gcc/var-tracking.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index 25973a9776e..9b28c7d273c 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -4921,7 +4921,9 @@ track_expr_p (tree expr, bool need_rtl)
realdecl = expr;
else if (!DECL_P (realdecl))
{
- if (handled_component_p (realdecl))
+ if (handled_component_p (realdecl)
+ || (TREE_CODE (realdecl) == MEM_REF
+ && TREE_CODE (TREE_OPERAND (realdecl, 0)) == ADDR_EXPR))
{
HOST_WIDE_INT bitsize, bitpos, maxsize;
tree innerdecl