@@ -546,8 +546,7 @@ bvt bv_pointerst::convert_bitvector(const exprt &expr)
546546 // do the same-object-test via an expression as this may permit re-using
547547 // already cached encodings of the equality test
548548 const exprt same_object = ::same_object (minus_expr.lhs (), minus_expr.rhs ());
549- const bvt &same_object_bv = convert_bv (same_object);
550- CHECK_RETURN (same_object_bv.size () == 1 );
549+ const literalt same_object_lit = convert (same_object);
551550
552551 // compute the object size (again, possibly using cached results)
553552 const exprt object_size = ::object_size (minus_expr.lhs ());
@@ -556,7 +555,7 @@ bvt bv_pointerst::convert_bitvector(const exprt &expr)
556555
557556 bvt bv = prop.new_variables (width);
558557
559- if (!same_object_bv[ 0 ] .is_false ())
558+ if (!same_object_lit .is_false ())
560559 {
561560 const pointer_typet &lhs_pt = to_pointer_type (minus_expr.lhs ().type ());
562561 const bvt &lhs = convert_bv (minus_expr.lhs ());
@@ -604,7 +603,7 @@ bvt bv_pointerst::convert_bitvector(const exprt &expr)
604603 }
605604
606605 prop.l_set_to_true (prop.limplies (
607- prop.land (same_object_bv[ 0 ] , prop.land (lhs_in_bounds, rhs_in_bounds)),
606+ prop.land (same_object_lit , prop.land (lhs_in_bounds, rhs_in_bounds)),
608607 bv_utils.equal (difference, bv)));
609608 }
610609
0 commit comments