mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 20:18:18 +00:00
fix #4191
This commit is contained in:
parent
8be266c18c
commit
47fa6ba7a6
|
@ -231,6 +231,9 @@ br_status bv2int_rewriter::mk_idiv(expr * arg1, expr * arg2, expr_ref & result)
|
||||||
|
|
||||||
br_status bv2int_rewriter::mk_mod(expr * s, expr * t, expr_ref & result) {
|
br_status bv2int_rewriter::mk_mod(expr * s, expr * t, expr_ref & result) {
|
||||||
expr_ref s1(m()), s2(m()), t1(m());
|
expr_ref s1(m()), s2(m()), t1(m());
|
||||||
|
rational r;
|
||||||
|
if (!m_arith.is_numeral(t, r) || !r.is_pos())
|
||||||
|
return BR_FAILED;
|
||||||
if (is_bv2int(s, s1) && is_bv2int(t, t1)) {
|
if (is_bv2int(s, s1) && is_bv2int(t, t1)) {
|
||||||
align_sizes(s1, t1, false);
|
align_sizes(s1, t1, false);
|
||||||
result = m_bv.mk_bv2int(m_bv.mk_bv_urem(s1, t1));
|
result = m_bv.mk_bv2int(m_bv.mk_bv_urem(s1, t1));
|
||||||
|
|
Loading…
Reference in a new issue