]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2012-05-31 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 31 May 2012 11:05:51 +0000 (11:05 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 31 May 2012 11:05:51 +0000 (11:05 +0000)
* 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

gcc/ChangeLog
gcc/tree-data-ref.c

index d8dd4aa4fc32660e0ffa2f6a83156f59ac6050f8..b7b0fffe4a0dd8750e1177e423bc49927b7cc06b 100644 (file)
@@ -1,3 +1,8 @@
+2012-05-31  Richard Guenther  <rguenther@suse.de>
+
+       * tree-data-ref.c (dr_analyze_innermost): Properly convert
+       the MEM_REF offset to sizetype.
+
 2012-05-31  Georg-Johann Lay  <avr@gjlay.de>
 
        * doc/invoke.texi (AVR Options): Fix typos.
index 8a23efa36dc6e2556fdf523fbfac40887db0863b..4568246294698e1cce003fb81ac3401638970a42 100644 (file)
@@ -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);
     }