File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed
regression/cbmc/same-object-04 Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ #include <assert.h>
2+ #include <stdlib.h>
3+
4+ void main ()
5+ {
6+ char * p = malloc (10 );
7+ char * q = p + 5 ;
8+
9+ assert (__CPROVER_same_object (p , q ));
10+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --no-simplify --no-propagation
4+ ^EXIT=0$
5+ ^SIGNAL=0$
6+ ^VERIFICATION SUCCESSFUL$
7+ --
8+ ^warning: ignoring
9+ --
10+ Check that __CPROVER_same_object() is true when given a pointer to the start of
11+ a memory block, and a pointer to within the memory block. We use --no-simplify
12+ and --no-propagation to ensure that the case is not solved by the constant
13+ propagation and thus tests the constraint encoding.
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+
4+ ^EXIT=0$
5+ ^SIGNAL=0$
6+ ^VERIFICATION SUCCESSFUL$
7+ --
8+ ^warning: ignoring
9+ --
10+ Check that __CPROVER_same_object() is true when given a pointer to the start of
11+ a memory block, and a pointer to within the memory block.
You can’t perform that action at this time.
0 commit comments