diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-19 16:07:51 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-19 16:07:51 +0000 |
commit | 53de1fafce9d8ef601f30f7cf86d76f7adee2b65 (patch) | |
tree | af231c099abf57d8cff96590ee4953a3f9d6dc0a /gcc/stor-layout.c | |
parent | 67d37a366cb18beba5b1a5d3676553a2d8c31e27 (diff) | |
download | gcc-53de1fafce9d8ef601f30f7cf86d76f7adee2b65.tar.gz |
* stor-layout.c (place_field): Set rli->offset_align properly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33262 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 0f3119f19ba..412fd318dd7 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -753,6 +753,9 @@ place_field (rli, field) rli->offset = round_up (rli->offset, desired_align / BITS_PER_UNIT); } + if (! TREE_CONSTANT (rli->offset)) + rli->offset_align = desired_align; + } /* Handle compatibility with PCC. Note that if the record has any @@ -821,9 +824,6 @@ place_field (rli, field) } #endif - if (! TREE_CONSTANT (rli->offset)) - rli->offset_align = DECL_ALIGN (field); - /* Offset so far becomes the position of this field after normalizing. */ normalize_rli (rli); DECL_FIELD_OFFSET (field) = rli->offset; @@ -866,6 +866,7 @@ place_field (rli, field) rli->offset = size_binop (PLUS_EXPR, rli->offset, DECL_SIZE_UNIT (field)); rli->bitpos = bitsize_zero_node; + rli->offset_align = MIN (rli->offset_align, DECL_ALIGN (field)); } else { |