aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-04-14 11:51:36 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2000-04-14 07:51:36 -0400
commitb1ba4cc3a816154b5290595bd1ac73280e75116e (patch)
tree7a1b792f83f98421a9e2d6ccf0436a8815a11d9d /gcc/stor-layout.c
parentb3ddc3ab4b734c79d52fb361255e364e02869866 (diff)
downloadgcc-b1ba4cc3a816154b5290595bd1ac73280e75116e.zip
gcc-b1ba4cc3a816154b5290595bd1ac73280e75116e.tar.gz
gcc-b1ba4cc3a816154b5290595bd1ac73280e75116e.tar.bz2
stor-layout.c (layout_decl): Properly compare KNOWN_ALIGN to see if DECL_BIT_FIELD needs to still be set.
* stor-layout.c (layout_decl): Properly compare KNOWN_ALIGN to see if DECL_BIT_FIELD needs to still be set. From-SVN: r33149
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index c27cc22..0f3119f 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -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;