From: rguenth Date: Thu, 31 May 2012 11:05:51 +0000 (+0000) Subject: 2012-05-31 Richard Guenther X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7667733bf93fc2c479026647bd516436effe4ea3;p=thirdparty%2Fgcc.git 2012-05-31 Richard Guenther * tree-data-ref.c (dr_analyze_innermost): Properly convert the MEM_REF offset to sizetype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188057 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d8dd4aa4fc32..b7b0fffe4a0d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-05-31 Richard Guenther + + * tree-data-ref.c (dr_analyze_innermost): Properly convert + the MEM_REF offset to sizetype. + 2012-05-31 Georg-Johann Lay * doc/invoke.texi (AVR Options): Fix typos. diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index 8a23efa36dc6..456824629469 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); }