Commit cd7e0bd4 by Uros Bizjak

re PR target/35496 (test failures between revs. 132950 and 132974)

	PR target/35496
	* stor-layout.c (update_alignment_for_field): Set minimum alignment
	of the underlying type of a MS bitfield layout to the natural
	alignment of the type.

From-SVN: r133343
parent 8ddbbcae
2008-03-19 Uros Bizjak <ubizjak@gmail.com>
PR target/35496
* stor-layout.c (update_alignment_for_field): Set minimum alignment
of the underlying type of a MS bitfield layout to the natural
alignment of the type.
2008-03-19 Jan Hubicka <jh@suse.cz>
PR other/35094
......
......@@ -699,6 +699,9 @@ update_alignment_for_field (record_layout_info rli, tree field,
&& ! integer_zerop (DECL_SIZE (rli->prev_field)))))
{
unsigned int type_align = TYPE_ALIGN (type);
unsigned int type_size
= tree_low_cst (TYPE_SIZE (type), 1);
type_align = MAX (type_align, type_size);
type_align = MAX (type_align, desired_align);
if (maximum_field_alignment != 0)
type_align = MIN (type_align, maximum_field_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