File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -337,17 +337,22 @@ static exprt bv_to_expr(
337337{
338338 PRECONDITION (can_cast_type<bitvector_typet>(bitvector_expr.type ()));
339339
340- if (
341- can_cast_type<bitvector_typet>(target_type) ||
342- target_type.id () == ID_c_enum || target_type.id () == ID_c_enum_tag ||
343- target_type.id () == ID_string)
340+ if (target_type.id () == ID_floatbv)
344341 {
345342 std::size_t width = to_bitvector_type (bitvector_expr.type ()).get_width ();
346343 exprt bv_expr =
347344 typecast_exprt::conditional_cast (bitvector_expr, bv_typet{width});
348345 return simplify_expr (
349346 typecast_exprt::conditional_cast (bv_expr, target_type), ns);
350347 }
348+ else if (
349+ can_cast_type<bitvector_typet>(target_type) ||
350+ target_type.id () == ID_c_enum || target_type.id () == ID_c_enum_tag ||
351+ target_type.id () == ID_string)
352+ {
353+ return simplify_expr (
354+ typecast_exprt::conditional_cast (bitvector_expr, target_type), ns);
355+ }
351356
352357 if (target_type.id () == ID_struct)
353358 {
You can’t perform that action at this time.
0 commit comments