File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
regression/cbmc/Float-smt2-1 Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1
- CORE smt-backend broken-smt-backend
1
+ CORE smt-backend
2
2
main.c
3
3
--smt2
4
4
^EXIT=10$
Original file line number Diff line number Diff line change @@ -2316,6 +2316,20 @@ void smt2_convt::convert_typecast(const typecast_exprt &expr)
2316
2316
const typecast_exprt tmp (src, bool_typet ());
2317
2317
convert_typecast (typecast_exprt (tmp, dest_type));
2318
2318
}
2319
+ else if (src_type.id () == ID_bv)
2320
+ {
2321
+ if (
2322
+ to_bv_type (src_type).get_width () !=
2323
+ to_floatbv_type (dest_type).get_width ())
2324
+ {
2325
+ UNEXPECTEDCASE (" Typecast bv -> float with wrong width" );
2326
+ }
2327
+
2328
+ if (use_FPA_theory)
2329
+ SMT2_TODO (" FPA cast bv -> float" );
2330
+ else
2331
+ convert_expr (src);
2332
+ }
2319
2333
else
2320
2334
UNEXPECTEDCASE (" Unknown typecast " +src_type.id_string ()+" -> float" );
2321
2335
}
You can’t perform that action at this time.
0 commit comments