Commit 002a9071 by Steve Ellcey Committed by Steve Ellcey

stor-layout.c (layout_type): Do not allow alignment of array elements to be…

stor-layout.c (layout_type): Do not allow alignment of array elements to be greater than their size.

	* stor-layout.c (layout_type): Do not allow alignment of array
	elements to be greater than their size.

From-SVN: r105095
parent 79a1aca7
2005-10-07 Steve Ellcey <sje@cup.hp.com>
* stor-layout.c (layout_type): Do not allow alignment of array
elements to be greater than their size.
2005-10-07 Steve Ellcey <sje@cup.hp.com>
* config.host (hppa*-*-hpux*): Change out_host_hook_obj and
host_xmake_file.
(hppa*-*-linux*): Ditto.
......
......@@ -1817,6 +1817,12 @@ layout_type (tree type)
TYPE_MODE (type) = BLKmode;
}
}
if (TYPE_SIZE_UNIT (element)
&& TREE_CODE (TYPE_SIZE_UNIT (element)) == INTEGER_CST
&& !integer_zerop (TYPE_SIZE_UNIT (element))
&& compare_tree_int (TYPE_SIZE_UNIT (element),
TYPE_ALIGN_UNIT (element)) < 0)
error ("alignment of array elements is greater than element size");
break;
}
......
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