projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d37f02
)
(layout_decl): Don't turn off DECL_BIT_FIELD if DECL's alignment is
author
Richard Kenner
<kenner@gcc.gnu.org>
Fri, 4 Oct 1996 11:01:47 +0000
(07:01 -0400)
committer
Richard Kenner
<kenner@gcc.gnu.org>
Fri, 4 Oct 1996 11:01:47 +0000
(07:01 -0400)
less than its type.
From-SVN: r12896
gcc/stor-layout.c
patch
|
blob
|
history
diff --git
a/gcc/stor-layout.c
b/gcc/stor-layout.c
index 5aca48384199113bfbcfa4b4e5011cb2ff199d34..c71c473978422c21fbab3533c0f651712f46274d 100644
(file)
--- a/
gcc/stor-layout.c
+++ b/
gcc/stor-layout.c
@@
-284,7
+284,8
@@
layout_decl (decl, known_align)
&& known_align % TYPE_ALIGN (type) == 0
&& DECL_SIZE (decl) != 0
&& (TREE_CODE (DECL_SIZE (decl)) != INTEGER_CST
- || (TREE_INT_CST_LOW (DECL_SIZE (decl)) % BITS_PER_UNIT) == 0))
+ || (TREE_INT_CST_LOW (DECL_SIZE (decl)) % BITS_PER_UNIT) == 0)
+ && DECL_ALIGN (decl) >= TYPE_ALIGN (type))
DECL_BIT_FIELD (decl) = 0;
/* Evaluate nonconstant size only once, either now or as soon as safe. */