Skip to content

Commit ff13416

Browse files
committed
Lower-byte-extract: fix union type preservation
If the input expression used a union tag, keep that in the result.
1 parent 11186f7 commit ff13416

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/solvers/lowering/byte_operators.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ exprt lower_byte_extract(const byte_extract_exprt &src, const namespacet &ns)
10411041
tmp.type() = max_comp_type;
10421042

10431043
return union_exprt(
1044-
max_comp_name, lower_byte_extract(tmp, ns), union_type);
1044+
max_comp_name, lower_byte_extract(tmp, ns), src.type());
10451045
}
10461046
}
10471047

0 commit comments

Comments
 (0)