diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-11-05 12:08:01 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-11-05 12:08:01 +0100 |
commit | cb1150418276ecc5a39261ad5a4204c8d9632803 (patch) | |
tree | 9dcd42def1d16831b55540a712c92971e7364378 /gcc | |
parent | a5ad8c30d627e2e243ebd0662c2d4dac778462d5 (diff) | |
download | gcc-cb1150418276ecc5a39261ad5a4204c8d9632803.zip gcc-cb1150418276ecc5a39261ad5a4204c8d9632803.tar.gz gcc-cb1150418276ecc5a39261ad5a4204c8d9632803.tar.bz2 |
cfgexpand.c (expand_debug_expr): Handle MEM_REF with non-zero offset.
* cfgexpand.c (expand_debug_expr): Handle MEM_REF
with non-zero offset.
From-SVN: r166353
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cfgexpand.c | 13 |
2 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a752a51..749951a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2010-11-05 Jakub Jelinek <jakub@redhat.com> + * cfgexpand.c (expand_debug_expr): Handle MEM_REF + with non-zero offset. + PR debug/46307 * tree-ssa-operands.c (get_expr_operands): Handle FMA_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index b302591..c44649e 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 |