[Bug target/35496] [4.4 Regression] test failures between revs. 132950 and 132974
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Mar 10 12:49:00 GMT 2008
------- Comment #16 from ubizjak at gmail dot com 2008-03-10 12:48 -------
(In reply to comment #14)
> Does MS bitfield struct require 8byte alignment for long long field
> for 32bit target?
Can you try following patch (this will aling DImode values to their natural
alignment - if bigger than default alignment - when MS bitfield is used):
Index: stor-layout.c
===================================================================
--- stor-layout.c (revision 133071)
+++ stor-layout.c (working copy)
@@ -699,6 +699,9 @@ update_alignment_for_field (record_layou
&& ! integer_zerop (DECL_SIZE (rli->prev_field)))))
{
unsigned int type_align = TYPE_ALIGN (type);
+ unsigned int type_size
+ = tree_low_cst (TYPE_SIZE_UNIT (type), 1) * BITS_PER_UNIT;
+ 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);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35496
More information about the Gcc-bugs
mailing list