OSDN Git Service

* stor-layout.c (layout_decl): Properly compare KNOWN_ALIGN to
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Apr 2000 11:51:36 +0000 (11:51 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Apr 2000 11:51:36 +0000 (11:51 +0000)
see if DECL_BIT_FIELD needs to still be set.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33149 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/stor-layout.c

index 26ff459..d068b59 100644 (file)
@@ -1,5 +1,8 @@
 Fri Apr 14 07:40:32 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
+       * stor-layout.c (layout_decl): Properly compare KNOWN_ALIGN to
+       see if DECL_BIT_FIELD needs to still be set.
+
        * tree.h (struct tree_type): Make PRECISION 9 bits and MODE 7.
 
        * dbxout.c (dbxout_type, case INTEGER_TYPE): Don't call
index c27cc22..0f3119f 100644 (file)
@@ -351,7 +351,7 @@ layout_decl (decl, known_align)
       register enum machine_mode xmode
        = mode_for_size_tree (DECL_SIZE (decl), MODE_INT, 1);
 
-      if (xmode != BLKmode && known_align > GET_MODE_ALIGNMENT (xmode))
+      if (xmode != BLKmode && known_align >= GET_MODE_ALIGNMENT (xmode))
        {
          DECL_ALIGN (decl) = MAX (GET_MODE_ALIGNMENT (xmode),
                                   DECL_ALIGN (decl));
@@ -363,7 +363,7 @@ layout_decl (decl, known_align)
   /* Turn off DECL_BIT_FIELD if we won't need it set.  */
   if (code == FIELD_DECL && DECL_BIT_FIELD (decl)
       && TYPE_MODE (type) == BLKmode && DECL_MODE (decl) == BLKmode
-      && known_align > TYPE_ALIGN (type)
+      && known_align >= TYPE_ALIGN (type)
       && DECL_ALIGN (decl) >= TYPE_ALIGN (type)
       && DECL_SIZE_UNIT (decl) != 0)
     DECL_BIT_FIELD (decl) = 0;