@@ -314,7 +314,7 @@ bool value_sett::eval_pointer_offset(
314
314
get_value_set (to_pointer_offset_expr (expr).pointer (), ns, true );
315
315
316
316
exprt new_expr;
317
- mp_integer previous_offset= 0 ;
317
+ bytest previous_offset{ 0 } ;
318
318
319
319
const object_map_dt &object_map=reference_set.read ();
320
320
for (object_map_dt::const_iterator
@@ -568,7 +568,7 @@ void value_sett::get_value_set_rec(
568
568
insert (
569
569
dest,
570
570
exprt (ID_null_object, to_pointer_type (expr_type).base_type ()),
571
- mp_integer {0 });
571
+ bytest {0 });
572
572
}
573
573
else if (expr_type.id ()==ID_unsignedbv ||
574
574
expr_type.id ()==ID_signedbv)
@@ -599,7 +599,7 @@ void value_sett::get_value_set_rec(
599
599
600
600
if (op.is_zero ())
601
601
{
602
- insert (dest, exprt (ID_null_object, empty_typet{}), mp_integer {0 });
602
+ insert (dest, exprt (ID_null_object, empty_typet{}), bytest {0 });
603
603
}
604
604
else
605
605
{
@@ -686,7 +686,7 @@ void value_sett::get_value_set_rec(
686
686
687
687
auto size = pointer_offset_size (pointer_base_type, ns);
688
688
689
- if (!size.has_value () || (*size) == 0 )
689
+ if (!size.has_value () || (*size) == bytest{ 0 } )
690
690
{
691
691
i.reset ();
692
692
}
@@ -728,7 +728,7 @@ void value_sett::get_value_set_rec(
728
728
729
729
// adjust by offset
730
730
if (offset && i.has_value ())
731
- *offset += *i ;
731
+ *offset += bytest{*i} ;
732
732
else
733
733
offset.reset ();
734
734
@@ -802,7 +802,7 @@ void value_sett::get_value_set_rec(
802
802
dynamic_object.set_instance (location_number);
803
803
dynamic_object.valid ()=true_exprt ();
804
804
805
- insert (dest, dynamic_object, mp_integer {0 });
805
+ insert (dest, dynamic_object, bytest {0 });
806
806
}
807
807
else if (statement==ID_cpp_new ||
808
808
statement==ID_cpp_new_array)
@@ -815,7 +815,7 @@ void value_sett::get_value_set_rec(
815
815
dynamic_object.set_instance (location_number);
816
816
dynamic_object.valid ()=true_exprt ();
817
817
818
- insert (dest, dynamic_object, mp_integer {0 });
818
+ insert (dest, dynamic_object, bytest {0 });
819
819
}
820
820
else
821
821
insert (dest, exprt (ID_unknown, original_type));
@@ -1146,7 +1146,7 @@ void value_sett::get_reference_set_rec(
1146
1146
to_array_type (expr.type ()).element_type ().id () == ID_array)
1147
1147
insert (dest, expr);
1148
1148
else
1149
- insert (dest, expr, mp_integer {0 });
1149
+ insert (dest, expr, bytest {0 });
1150
1150
1151
1151
return ;
1152
1152
}
@@ -1173,7 +1173,7 @@ void value_sett::get_reference_set_rec(
1173
1173
1174
1174
const index_exprt &index_expr=to_index_expr (expr);
1175
1175
const exprt &array=index_expr.array ();
1176
- const exprt &offset= index_expr.index ();
1176
+ const exprt &index = index_expr.index ();
1177
1177
1178
1178
DATA_INVARIANT (
1179
1179
array.type ().id () == ID_array, " index takes array-typed operand" );
@@ -1201,19 +1201,19 @@ void value_sett::get_reference_set_rec(
1201
1201
from_integer (0 , c_index_type ()));
1202
1202
1203
1203
offsett o = a_it->second ;
1204
- const auto i = numeric_cast<mp_integer>(offset );
1204
+ const auto i = numeric_cast<mp_integer>(index );
1205
1205
1206
- if (offset .is_zero ())
1206
+ if (index .is_zero ())
1207
1207
{
1208
1208
}
1209
1209
else if (i.has_value () && o)
1210
1210
{
1211
1211
auto size = pointer_offset_size (array_type.element_type (), ns);
1212
1212
1213
- if (!size.has_value () || *size == 0 )
1213
+ if (!size.has_value () || *size == bytest{ 0 } )
1214
1214
o.reset ();
1215
1215
else
1216
- *o = *i * (*size);
1216
+ *o = bytest{ *i * (*size)} ;
1217
1217
}
1218
1218
else
1219
1219
o.reset ();
0 commit comments