File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 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(
264264 return dereference_rec (op, offset, type); // just pass down
265265 else if (op_type.id ()==ID_signedbv || op_type.id ()==ID_unsignedbv)
266266 {
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.
270270
271271 exprt integer=op;
272272
273273 if (!offset.is_zero ())
274274 integer=
275275 plus_exprt (offset, typecast_exprt (op, offset.type ()));
276276
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);
281278 }
282279 else
283280 throw " dereferencet: unexpected cast" ;
Original file line number Diff line number Diff line change @@ -823,6 +823,7 @@ IREP_ID_ONE(array_replace)
823823IREP_ID_ONE(switch_case_number)
824824IREP_ID_ONE(java_array_access)
825825IREP_ID_ONE(java_member_access)
826+ IREP_ID_ONE(integer_dereference)
826827
827828#undef IREP_ID_ONE
828829#undef IREP_ID_TWO
You can’t perform that action at this time.
0 commit comments