now the testcase works on i386-linux as well.
Unified · Split
| @@ -3362,9 +3362,9 @@ static void struct_layout(CType *type, AttributeDef *ad) · 3361 unmodified lines | ||
| 3362 | 3362 | (ofs2 / (typealign * 8)) > (size/typealign))) { |
| 3363 | 3363 | c = (c + ((bit_pos + 7) >> 3) + typealign - 1) & -typealign; |
| 3364 | 3364 | bit_pos = 0; |
| 3365 | − } else while (bit_pos + bit_size > size * 8) { | |
| 3366 | − c += size; | |
| 3367 | − bit_pos -= size * 8; | |
| 3365 | + } else if (bit_pos + bit_size > size * 8) { | |
| 3366 | + c += bit_pos >> 3; | |
| 3367 | + bit_pos &= 7; | |
| 3368 | 3368 | } |
| 3369 | 3369 | offset = c; |
| 3370 | 3370 | /* In PCC layout named bit-fields influence the alignment |