Commit a1471322 by Richard Kenner Committed by Richard Kenner

stor-layout.c (layout_type, [...]): Give one-element array the same mode as its component.

	* stor-layout.c (layout_type, case ARRAY_TYPE): Give one-element array
	the same mode as its component.

From-SVN: r51745
parent c8b94768
Tue Apr 2 06:47:40 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* stor-layout.c (layout_type, case ARRAY_TYPE): Give one-element array
the same mode as its component.
2002-04-02 Richard Henderson <rth@redhat.com>
PR opt/190
......
......@@ -1584,8 +1584,13 @@ layout_type (type)
&& (TYPE_MODE (TREE_TYPE (type)) != BLKmode
|| TYPE_NO_FORCE_BLK (TREE_TYPE (type))))
{
TYPE_MODE (type)
= mode_for_size_tree (TYPE_SIZE (type), MODE_INT, 1);
/* One-element arrays get the component type's mode. */
if (simple_cst_equal (TYPE_SIZE (type),
TYPE_SIZE (TREE_TYPE (type))))
TYPE_MODE (type) = TYPE_MODE (TREE_TYPE (type));
else
TYPE_MODE (type)
= mode_for_size_tree (TYPE_SIZE (type), MODE_INT, 1);
if (TYPE_MODE (type) != BLKmode
&& STRICT_ALIGNMENT && TYPE_ALIGN (type) < BIGGEST_ALIGNMENT
......
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