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(
337
337
{
338
338
PRECONDITION (can_cast_type<bitvector_typet>(bitvector_expr.type ()));
339
339
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)
344
341
{
345
342
std::size_t width = to_bitvector_type (bitvector_expr.type ()).get_width ();
346
343
exprt bv_expr =
347
344
typecast_exprt::conditional_cast (bitvector_expr, bv_typet{width});
348
345
return simplify_expr (
349
346
typecast_exprt::conditional_cast (bv_expr, target_type), ns);
350
347
}
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
+ }
351
356
352
357
if (target_type.id () == ID_struct)
353
358
{
You can’t perform that action at this time.
0 commit comments