aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-05-31 11:05:51 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-05-31 11:05:51 +0000
commit673910d7aa471f626774fee200a5f5c409263c34 (patch)
treeb49a3842d964280a33a69d3bd85cbf92a1d708bb /gcc/tree-data-ref.c
parent669e9a8fcd7cf58a13543ac43cf8cb1eeb977d61 (diff)
downloadgcc-673910d7aa471f626774fee200a5f5c409263c34.zip
gcc-673910d7aa471f626774fee200a5f5c409263c34.tar.gz
gcc-673910d7aa471f626774fee200a5f5c409263c34.tar.bz2
tree-data-ref.c (dr_analyze_innermost): Properly convert the MEM_REF offset to sizetype.
2012-05-31 Richard Guenther <rguenther@suse.de> * tree-data-ref.c (dr_analyze_innermost): Properly convert the MEM_REF offset to sizetype. From-SVN: r188057
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r--gcc/tree-data-ref.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index 8a23efa..4568246 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -720,13 +720,12 @@ dr_analyze_innermost (struct data_reference *dr, struct loop *nest)
{
if (!integer_zerop (TREE_OPERAND (base, 1)))
{
+ double_int moff = mem_ref_offset (base);
+ tree mofft = double_int_to_tree (sizetype, moff);
if (!poffset)
- {
- double_int moff = mem_ref_offset (base);
- poffset = double_int_to_tree (sizetype, moff);
- }
+ poffset = mofft;
else
- poffset = size_binop (PLUS_EXPR, poffset, TREE_OPERAND (base, 1));
+ poffset = size_binop (PLUS_EXPR, poffset, mofft);
}
base = TREE_OPERAND (base, 0);
}