(pointer_int_sum): Use TYPE_PRECISION (sizetype) not

POINTER_SIZE to agree with expr.c.

From-SVN: r11088
This commit is contained in:
Jim Wilson 1996-01-24 11:31:38 -08:00
parent 92acadfe28
commit b200d1aa65
1 changed files with 3 additions and 3 deletions

View File

@ -2645,11 +2645,11 @@ pointer_int_sum (resultcode, ptrop, intop)
intop = convert (int_type, TREE_OPERAND (intop, 0));
}
/* Convert the integer argument to a type the same size as a pointer
/* Convert the integer argument to a type the same size as sizetype
so the multiply won't overflow spuriously. */
if (TYPE_PRECISION (TREE_TYPE (intop)) != POINTER_SIZE)
intop = convert (type_for_size (POINTER_SIZE, 0), intop);
if (TYPE_PRECISION (TREE_TYPE (intop)) != TYPE_PRECISION (sizetype))
intop = convert (type_for_size (TYPE_PRECISION (sizetype), 0), intop);
/* Replace the integer argument with a suitable product by the object size.
Do this multiplication as signed, then convert to the appropriate