This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/28161] Wrong bit field layout with -mms-bitfields
- From: "seongbae dot park at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jun 2006 21:10:42 -0000
- Subject: [Bug middle-end/28161] Wrong bit field layout with -mms-bitfields
- References: <bug-28161-5208@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from seongbae dot park at gmail dot com 2006-06-26 21:10 -------
More specifically:
1048 if (rli->remaining_in_alignment < bitsize)
1049 {
1050 /* out of bits; bump up to next 'word'. */
1051 rli->offset = DECL_FIELD_OFFSET (rli->prev_field);
1052 rli->bitpos
1053 = size_binop (PLUS_EXPR, TYPE_SIZE (type),
1054 DECL_FIELD_BIT_OFFSET
(rli->prev_field));
1055 rli->prev_field = field;
1056 rli->remaining_in_alignment
1057 = tree_low_cst (TYPE_SIZE (type), 1);
1058 }
The third operand of size_binop() of size_binop() at line 1053-1054
should be rli->bitpos.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28161