summaryrefslogtreecommitdiff
path: root/gcc/tree-dfa.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-dfa.h')
-rw-r--r--gcc/tree-dfa.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/tree-dfa.h b/gcc/tree-dfa.h
index 7d0a47009f6..86590ad462d 100644
--- a/gcc/tree-dfa.h
+++ b/gcc/tree-dfa.h
@@ -1,5 +1,5 @@
/* Header file for tree data flow functions.
- Copyright (C) 2013 Free Software Foundation, Inc.
+ Copyright (C) 2013-2014 Free Software Foundation, Inc.
This file is part of GCC.
@@ -102,11 +102,11 @@ 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;
+ double_int doffset
+ = (TREE_INT_CST (index) - TREE_INT_CST (low_bound))
+ .sext (TYPE_PRECISION (TREE_TYPE (index)));
+ doffset *= tree_to_double_int (unit_size);
+ byte_offset += doffset.to_shwi ();
}
else
return NULL_TREE;