File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
src/goto-instrument/contracts Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ assigns_clause_targett::assigns_clause_targett(
2626 contract(contract),
2727 init_block(),
2828 log(log_parameter),
29- local_target(typet())
29+ local_target(typet()),
30+ target_id(object_ptr.id())
3031{
3132 INVARIANT (
3233 pointer_object.type ().id () == ID_pointer,
@@ -74,6 +75,11 @@ exprt assigns_clause_targett::alias_expression(const exprt &lhs)
7475 return conjunction (condition);
7576 }
7677
78+ if (target_id == ID_dereference)
79+ {
80+ return conjunction (condition);
81+ }
82+
7783 const exprt lhs_offset = pointer_offset (lhs_ptr);
7884 const exprt target_offset = pointer_offset (target);
7985
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ Date: July 2021
1616
1717#include " contracts.h"
1818
19- #include < ansi-c/expr2c.h>
2019#include < util/pointer_offset_size.h>
2120
2221// / \brief A base class for assigns clause targets
@@ -48,6 +47,7 @@ class assigns_clause_targett
4847 goto_programt init_block;
4948 messaget &log;
5049 symbol_exprt local_target;
50+ const irep_idt &target_id;
5151};
5252
5353class assigns_clauset
You can’t perform that action at this time.
0 commit comments