File tree 2 files changed +5
-7
lines changed
2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -264,20 +264,17 @@ exprt dereferencet::dereference_typecast(
264
264
return dereference_rec (op, offset, type); // just pass down
265
265
else if (op_type.id ()==ID_signedbv || op_type.id ()==ID_unsignedbv)
266
266
{
267
- // We got an integer-typed address A. We turn this back (!)
268
- // into *(type *)( A+offset), and then let some other layer
269
- // worry about it.
267
+ // We got an integer-typed address A. We turn this
268
+ // into integer_dereference( A+offset),
269
+ // and then let some other layer worry about it.
270
270
271
271
exprt integer=op;
272
272
273
273
if (!offset.is_zero ())
274
274
integer=
275
275
plus_exprt (offset, typecast_exprt (op, offset.type ()));
276
276
277
- exprt new_typecast=
278
- typecast_exprt (integer, pointer_type (type));
279
-
280
- return dereference_exprt (new_typecast, type);
277
+ return unary_exprt (ID_integer_dereference, integer, type);
281
278
}
282
279
else
283
280
throw " dereferencet: unexpected cast" ;
Original file line number Diff line number Diff line change @@ -823,6 +823,7 @@ IREP_ID_ONE(array_replace)
823
823
IREP_ID_ONE(switch_case_number)
824
824
IREP_ID_ONE(java_array_access)
825
825
IREP_ID_ONE(java_member_access)
826
+ IREP_ID_ONE(integer_dereference)
826
827
827
828
#undef IREP_ID_ONE
828
829
#undef IREP_ID_TWO
You can’t perform that action at this time.
0 commit comments