summaryrefslogtreecommitdiff
path: root/gcc/gimple-fold.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-23 10:50:41 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-23 10:50:41 +0000
commit936a705d6c5baca09ed207c901a1d5cdbd6bcc37 (patch)
treee504c9314475938c1021b9cded5ab509fb219c51 /gcc/gimple-fold.c
parentb3fba3cd910887e6f0a93df245c37cd654df3635 (diff)
downloadgcc-936a705d6c5baca09ed207c901a1d5cdbd6bcc37.tar.gz
Undo some changes from trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@209692 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple-fold.c')
-rw-r--r--gcc/gimple-fold.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index f0fd30d3635..a88489ef54c 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -3163,12 +3163,13 @@ fold_const_aggregate_ref_1 (tree t, tree (*valueize) (tree))
&& (idx = (*valueize) (TREE_OPERAND (t, 1)))
&& TREE_CODE (idx) == INTEGER_CST)
{
- tree low_bound = array_ref_low_bound (t);
- tree unit_size = array_ref_element_size (t);
+ tree low_bound, unit_size;
/* If the resulting bit-offset is constant, track it. */
- if (TREE_CODE (low_bound) == INTEGER_CST
- && tree_fits_uhwi_p (unit_size))
+ if ((low_bound = array_ref_low_bound (t),
+ TREE_CODE (low_bound) == INTEGER_CST)
+ && (unit_size = array_ref_element_size (t),
+ tree_fits_uhwi_p (unit_size)))
{
offset_int woffset
= wi::sext (wi::to_offset (idx) - wi::to_offset (low_bound),