Skip to content

Commit de9e29e

Browse files
committed
fix constructor of field_address_exprt
This fixes the constructor of field_address_exprt.
1 parent a05ba67 commit de9e29e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/util/pointer_expr.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ field_address_exprt::field_address_exprt(
138138
pointer_typet _type)
139139
: unary_exprt(ID_field_address, std::move(compound_ptr), std::move(_type))
140140
{
141-
const auto &compound_ptr_type = compound_ptr.type();
142-
PRECONDITION(compound_ptr_type.id() == ID_pointer);
143-
const auto &compound_type = to_pointer_type(compound_ptr_type).base_type();
141+
const auto &base_type = field_address_exprt::base().type();
142+
PRECONDITION(base_type.id() == ID_pointer);
143+
const auto &compound_type = to_pointer_type(base_type).base_type();
144144
PRECONDITION(
145145
compound_type.id() == ID_struct || compound_type.id() == ID_struct_tag ||
146146
compound_type.id() == ID_union || compound_type.id() == ID_union_tag);

0 commit comments

Comments
 (0)