summaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-05 11:08:01 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-05 11:08:01 +0000
commit7ef770fa2975aee89a6c5a31de892eab2404e204 (patch)
tree9dcd42def1d16831b55540a712c92971e7364378 /gcc/cfgexpand.c
parentfa2012e05332c1e74c0bad9385d6a7e8fdffc883 (diff)
downloadgcc-7ef770fa2975aee89a6c5a31de892eab2404e204.tar.gz
* cfgexpand.c (expand_debug_expr): Handle MEM_REF
with non-zero offset. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166353 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index b302591e66e..c44649e857d 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -2552,15 +2552,20 @@ expand_debug_expr (tree exp)
}
case MEM_REF:
- /* ??? FIXME. */
- if (!integer_zerop (TREE_OPERAND (exp, 1)))
- return NULL;
- /* Fallthru. */
case INDIRECT_REF:
op0 = expand_debug_expr (TREE_OPERAND (exp, 0));
if (!op0)
return NULL;
+ if (TREE_CODE (exp) == MEM_REF)
+ {
+ op1 = expand_debug_expr (TREE_OPERAND (exp, 1));
+ if (!op1 || !CONST_INT_P (op1))
+ return NULL;
+
+ op0 = plus_constant (op0, INTVAL (op1));
+ }
+
if (POINTER_TYPE_P (TREE_TYPE (exp)))
as = TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (exp)));
else