Skip to content

Commit

Permalink
Byte extract lowering of unions: convert width to bytes
Browse files Browse the repository at this point in the history
The upper bound for lowering a union to a sequence of bytes is the
byte-width of the widest member, not the bit width.
  • Loading branch information
tautschnig committed Jul 19, 2023
1 parent 0834274 commit 8f0e618
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/lower_byte_operators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ static exprt unpack_rec(
member,
little_endian,
offset_bytes,
widest_member->second,
(widest_member->second + bits_per_byte - 1) / bits_per_byte,
bits_per_byte,
ns,
true);
Expand Down

0 comments on commit 8f0e618

Please sign in to comment.