summaryrefslogtreecommitdiffstats
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-10-26 16:13:10 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-10-26 16:13:10 +0000
commitd81b6e00f179f1b96dc90853d2a638cf9f5f1400 (patch)
treed8c0ea63a4e3fb849109a7d77cd00ed7efb531dd /gcc/expr.c
parented25da0ddcc0d89d07432894cbbaf7eb0b847b4d (diff)
downloadppe42-gcc-d81b6e00f179f1b96dc90853d2a638cf9f5f1400.tar.gz
ppe42-gcc-d81b6e00f179f1b96dc90853d2a638cf9f5f1400.zip
* expr.c (get_inner_reference): Remove the array bias after
converting the index to Pmode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16178 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 91d682a93fd..920ffbc2461 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -4345,9 +4345,6 @@ get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode,
= domain ? TYPE_MIN_VALUE (domain) : integer_zero_node;
tree index_type = TREE_TYPE (index);
- if (! integer_zerop (low_bound))
- index = fold (build (MINUS_EXPR, index_type, index, low_bound));
-
if (TYPE_PRECISION (index_type) != TYPE_PRECISION (sizetype))
{
index = convert (type_for_size (TYPE_PRECISION (sizetype), 0),
@@ -4355,6 +4352,9 @@ get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode,
index_type = TREE_TYPE (index);
}
+ if (! integer_zerop (low_bound))
+ index = fold (build (MINUS_EXPR, index_type, index, low_bound));
+
index = fold (build (MULT_EXPR, index_type, index,
convert (index_type,
TYPE_SIZE (TREE_TYPE (exp)))));
OpenPOWER on IntegriCloud