Commit 501eb93c by Jim Wilson Committed by Jim Wilson

Fix mn10200-elf libio build failure, and minor performance regression.

	* stor-layout.c (layout_type): When compute TYPE_SIZE_UNIT from
	TYPE_SIZE, convert type of result to sizetype.

From-SVN: r30270
parent 3071fab5
Fri Oct 29 17:00:42 1999 Jim Wilson <wilson@cygnus.com>
* stor-layout.c (layout_type): When compute TYPE_SIZE_UNIT from
TYPE_SIZE, convert type of result to sizetype.
Fri Oct 29 14:34:17 1999 Richard Henderson <rth@cygnus.com>
* flow.c (count_or_remove_death_notes): Equate NULL with the
......
......@@ -1106,8 +1106,12 @@ layout_type (type)
of the type above, find it by division. */
if (TYPE_SIZE_UNIT (type) == 0 && TYPE_SIZE (type) != 0)
{
TYPE_SIZE_UNIT (type) = size_binop (FLOOR_DIV_EXPR, TYPE_SIZE (type),
size_int (BITS_PER_UNIT));
/* TYPE_SIZE (type) is computed in bitsizetype. After the division, the
result will fit in sizetype. We will get more efficient code using
sizetype, so we force a conversion. */
tree unit_size = size_binop (FLOOR_DIV_EXPR, TYPE_SIZE (type),
size_int (BITS_PER_UNIT));
TYPE_SIZE_UNIT (type) = convert (sizetype, unit_size);
}
/* Once again evaluate only once, either now or as soon as safe. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment