We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents abb78df + 663b51a commit 40513b3Copy full SHA for 40513b3
src/util/simplify_expr.cpp
@@ -218,11 +218,11 @@ bool simplify_exprt::simplify_typecast(exprt &expr)
218
if(expr_type.id()==ID_bool)
219
{
220
// rewrite (bool)x to x!=0
221
- binary_relation_exprt inequality;
222
- inequality.id(op_type.id()==ID_floatbv?ID_ieee_float_notequal:ID_notequal);
+ binary_relation_exprt inequality(
+ expr.op0(),
223
+ op_type.id() == ID_floatbv ? ID_ieee_float_notequal : ID_notequal,
224
+ from_integer(0, op_type));
225
inequality.add_source_location()=expr.source_location();
- inequality.lhs()=expr.op0();
- inequality.rhs()=from_integer(0, op_type);
226
CHECK_RETURN(inequality.rhs().is_not_nil());
227
simplify_node(inequality);
228
expr.swap(inequality);
0 commit comments