3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-04 06:53:58 +00:00

fix #2418, change types in sat_solver to avoid cast

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-07-24 11:52:28 -07:00
parent 809b0ebca7
commit 604e6b2705
4 changed files with 18 additions and 16 deletions

View file

@ -1041,8 +1041,9 @@ bool poly_rewriter<Config>::hoist_ite(expr* a, obj_hashtable<expr>& shared, nume
}
rational k, g1;
if (is_int_numeral(a, k)) {
normalize(k);
g = gcd(g, k);
return shared.empty();
return !is_minus_one(a) && shared.empty();
}
ptr_buffer<expr> adds;
TO_BUFFER(is_add, adds, a);