]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/tree-dfa.h
Merge with trunk.
[thirdparty/gcc.git] / gcc / tree-dfa.h
index ab7dd19f09f2deb30794df8cdca74e766a5b5af7..13811a07edfbe376bdbc04776bf257323f8f517c 100644 (file)
@@ -102,11 +102,10 @@ get_addr_base_and_unit_offset_1 (tree exp, HOST_WIDE_INT *poffset,
                && (unit_size = array_ref_element_size (exp),
                    TREE_CODE (unit_size) == INTEGER_CST))
              {
-               HOST_WIDE_INT hindex = TREE_INT_CST_LOW (index);
-
-               hindex -= TREE_INT_CST_LOW (low_bound);
-               hindex *= TREE_INT_CST_LOW (unit_size);
-               byte_offset += hindex;
+               offset_int woffset
+                 = offset_int::from (wi::sub (index, low_bound), SIGNED);
+               woffset *= wi::to_offset (unit_size);
+               byte_offset += woffset.to_shwi ();
              }
            else
              return NULL_TREE;