Skip to content

Commit aae6d15

Browse files
boolbv: fix fixedbv-type check in convert_rest for ID_isfinite
The ID_isfinite branch in boolbvt::convert_rest tested 'op.id() == ID_fixedbv', but ID_fixedbv is a *type* id and op is the operand expression, not a type. The dead branch never matched and fixedbv operands fell through to SUB::convert_rest, which is not prepared to lower an isfinite expression and would yield an unexpected result or conversion failure. The neighbouring ID_isnan, ID_isinf, and ID_isnormal branches all correctly use 'op.type().id() == ID_fixedbv'. Bring ID_isfinite into line. Pre-existing typo, unrelated to the surrounding refactoring; fixed here because it sits in the immediate neighbourhood of changes to the floatbv branch and to keep the fixedbv handling consistent. Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>
1 parent cbdcf13 commit aae6d15

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/solvers/flattening/boolbv.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ literalt boolbvt::convert_rest(const exprt &expr)
461461
!float_utils.is_infinity(bv),
462462
!float_utils.is_NaN(bv));
463463
}
464-
else if(op.id() == ID_fixedbv)
464+
else if(op.type().id() == ID_fixedbv)
465465
return const_literal(true);
466466
}
467467
else if(expr.id()==ID_isinf)

0 commit comments

Comments
 (0)