re PR target/35496 (test failures between revs. 132950 and 132974)
authorUros Bizjak <uros@gcc.gnu.org>
Wed, 19 Mar 2008 14:50:15 +0000 (15:50 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Wed, 19 Mar 2008 14:50:15 +0000 (15:50 +0100)
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

gcc/ChangeLog
gcc/stor-layout.c

index 845455ca39c757ce20d52c1b54f684cd7ce4bd7e..21135c054c6992a2525823defd3e63b5e52d1249 100644 (file)
@@ -1,3 +1,10 @@
+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
        (maybe_fold_stmt_addition): Likewise.
 
 2008-03-15  Bjoern Haase  <bjoern.m.haase@web.de>
-            Anatoly Sokolov <aesok@post.ru>
+           Anatoly Sokolov <aesok@post.ru>
 
        * gcc/gcc/config/avr/avr.c (avr_arch_types): Add avr6 entry.
        (avr_arch): Add ARCH_AVR6.
 2008-03-04  Danny Smith  <dannysmith@users.sourceforge.net>
 
        * config/i386/i386.md (allocate_stack_worker_32): Use  __chkstk
-        label to probe the stack.
+       label to probe the stack.
 
 2008-03-04  Danny Smith  <dannysmith@users.sourceforge.net>
 
 
 2008-02-26  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
 
-        PR 26264
+       PR 26264
        * builtins.def (BUILT_IN_STDARG_START): Remove.
        * builtins.c (expand_builtin): Remove BUILT_IN_STDARG_START.
        * tree-stdarg.c (execute_optimize_stdarg): Likewise.
        PR fortran/29549
        * doc/invoke.texi (-fcx-limited-range): Document new option.
        * toplev.c (process_options): Handle -fcx-fortran-rules.
-        * common.opt: Add documentation for -fcx-fortran-rules.
+       * common.opt: Add documentation for -fcx-fortran-rules.
 
 2008-02-25  Janne Blomqvist  <jb@gcc.gnu.org>
 
index 67e4c25fbdc25104e25947f5c3d20a6026baf888..ff46687834db93cbc2f82879b843eb2c04803742 100644 (file)
@@ -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);