@@ -153,7 +153,7 @@ exprt goto_symext::address_arithmetic(
153
153
}
154
154
155
155
// do (expr.type() *)(((char *)op)+offset)
156
- result=typecast_exprt (result, pointer_typet (char_type ()));
156
+ result=typecast_exprt (result, pointer_type (char_type ()));
157
157
158
158
// there could be further dereferencing in the offset
159
159
exprt offset=be.offset ();
@@ -163,14 +163,14 @@ exprt goto_symext::address_arithmetic(
163
163
164
164
// treat &array as &array[0]
165
165
const typet &expr_type=ns.follow (expr.type ());
166
- pointer_typet dest_type ;
166
+ typet dest_type_subtype ;
167
167
168
168
if (expr_type.id ()==ID_array && !keep_array)
169
- dest_type. subtype () =expr_type.subtype ();
169
+ dest_type_subtype =expr_type.subtype ();
170
170
else
171
- dest_type. subtype () =expr_type;
171
+ dest_type_subtype =expr_type;
172
172
173
- result=typecast_exprt (result, dest_type );
173
+ result=typecast_exprt (result, pointer_type (dest_type_subtype) );
174
174
}
175
175
else if (expr.id ()==ID_index ||
176
176
expr.id ()==ID_member)
@@ -253,7 +253,7 @@ exprt goto_symext::address_arithmetic(
253
253
254
254
const typet &expr_type=ns.follow (expr.type ());
255
255
assert ((expr_type.id ()==ID_array && !keep_array) ||
256
- base_type_eq (pointer_typet (expr_type), result.type (), ns));
256
+ base_type_eq (pointer_type (expr_type), result.type (), ns));
257
257
258
258
return result;
259
259
}
@@ -324,7 +324,7 @@ void goto_symext::dereference_rec(
324
324
index_exprt index_expr=to_index_expr (expr);
325
325
326
326
address_of_exprt address_of_expr (index_expr.array ());
327
- address_of_expr.type ()=pointer_typet (expr.type ());
327
+ address_of_expr.type ()=pointer_type (expr.type ());
328
328
329
329
dereference_exprt tmp;
330
330
tmp.pointer ()=plus_exprt (address_of_expr, index_expr.index ());
@@ -361,7 +361,7 @@ void goto_symext::dereference_rec(
361
361
to_address_of_expr (tc_op).object ().type ().id ()==ID_array &&
362
362
base_type_eq (
363
363
expr.type (),
364
- pointer_typet (to_address_of_expr (tc_op).object ().type ().subtype ()),
364
+ pointer_type (to_address_of_expr (tc_op).object ().type ().subtype ()),
365
365
ns))
366
366
{
367
367
expr=
0 commit comments