File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -254,11 +254,10 @@ bvt bv_pointerst::convert_pointer_type(const exprt &expr)
254254 if (op_type.id ()==ID_pointer)
255255 return convert_bv (op);
256256 else if (
257- op_type.id () == ID_signedbv || op_type.id () == ID_unsignedbv ||
258- op_type.id () == ID_bool || op_type.id () == ID_c_enum ||
259- op_type.id () == ID_c_enum_tag || op_type.id () == ID_bv)
257+ can_cast_type<bitvector_typet>(op_type) || op_type.id () == ID_bool ||
258+ op_type.id () == ID_c_enum || op_type.id () == ID_c_enum_tag)
260259 {
261- // Cast from integer to pointer.
260+ // Cast from a bitvector type to pointer.
262261 // We just do a zero extension.
263262
264263 const bvt &op_bv=convert_bv (op);
Original file line number Diff line number Diff line change @@ -829,6 +829,10 @@ std::string smt2_convt::type2id(const typet &type) const
829829 {
830830 return type2id (ns.follow_tag (to_c_enum_tag_type (type)).subtype ());
831831 }
832+ else if (type.id () == ID_pointer)
833+ {
834+ return " p" + std::to_string (to_pointer_type (type).get_width ());
835+ }
832836 else
833837 {
834838 UNREACHABLE;
You can’t perform that action at this time.
0 commit comments