aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tccgen.c b/tccgen.c
index a5de7e9..1efbc1f 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -3391,6 +3391,9 @@ static void struct_layout(CType *type, AttributeDef *ad)
(ofs2 / (typealign * 8)) > (size/typealign))) {
c = (c + ((bit_pos + 7) >> 3) + typealign - 1) & -typealign;
bit_pos = 0;
+ } else while (bit_pos + bit_size > size * 8) {
+ c += size;
+ bit_pos -= size * 8;
}
offset = c;
/* In PCC layout named bit-fields influence the alignment