summaryrefslogtreecommitdiff
path: root/gcc/gimple-fold.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-20 13:32:32 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-20 13:32:32 +0000
commitfe5ad9266cba2cbb611a831aaac450d3f6decd0c (patch)
treea1dce161550e71aa81d0af00e118e4f68d907995 /gcc/gimple-fold.c
parent6715fbd40b05c43941c4d4e093cceb5345a695e7 (diff)
parent8c53c46cebf42cb4f4ac125ca6428c5e9b519f66 (diff)
downloadgcc-fe5ad9266cba2cbb611a831aaac450d3f6decd0c.tar.gz
Merge from trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@205111 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple-fold.c')
-rw-r--r--gcc/gimple-fold.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index 80c23be230d..5d904029769 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -23,6 +23,10 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
+#include "stringpool.h"
+#include "expr.h"
+#include "stmt.h"
+#include "stor-layout.h"
#include "flags.h"
#include "function.h"
#include "dumpfile.h"
@@ -3064,7 +3068,7 @@ fold_const_aggregate_ref_1 (tree t, tree (*valueize) (tree))
offset = woffset.to_shwi ();
/* TODO: This code seems wrong, multiply then check
to see if it fits. */
- offset *= TREE_INT_CST_LOW (unit_size);
+ offset *= tree_to_uhwi (unit_size);
offset *= BITS_PER_UNIT;
base = TREE_OPERAND (t, 0);