Skip to content

Commit c6baef2

Browse files
committed
simplify_exprt::bits2expr is now independent of bitvector representation
1 parent 444bb50 commit c6baef2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/util/simplify_expr.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,9 @@ exprt simplify_exprt::bits2expr(
14581458
tmp[i]=bits[map.map_bit(i)];
14591459

14601460
std::reverse(tmp.begin(), tmp.end());
1461-
return constant_exprt(tmp, type);
1461+
1462+
mp_integer i = binary2integer(tmp, false);
1463+
return constant_exprt(integer2bv(i, bits.size()), type);
14621464
}
14631465
else if(type.id()==ID_c_enum)
14641466
{

0 commit comments

Comments
 (0)