File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
regression/cbmc-incr-smt2/pointers Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ #define NULL (void *)0
2+
3+ int main ()
4+ {
5+ int foo ;
6+
7+ // The identifiers are allocated deterministically, so we want to check the
8+ // following properties hold:
9+
10+ // The pointer object of NULL is always going to be zero.
11+ __CPROVER_assert (
12+ __CPROVER_POINTER_OBJECT (NULL ) != 0 ,
13+ "expected to fail with object ID == 0" );
14+ // In the case where the program contains a single address of operation,
15+ // the pointer object is going to be 1.
16+ __CPROVER_assert (
17+ __CPROVER_POINTER_OBJECT (& foo ) != 1 ,
18+ "expected to fail with object ID == 1" );
19+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ pointer_object3.c
3+
4+ \[main\.assertion\.1] line \d+ expected to fail with object ID == 0: FAILURE
5+ \[main\.assertion\.2] line \d+ expected to fail with object ID == 1: FAILURE
6+ ^VERIFICATION FAILED$
7+ ^EXIT=10$
8+ ^SIGNAL=0$
9+ --
10+ --
11+ Test that the assignment of object IDs to objects is deterministic:
12+ * 0 for the NULL object, and
13+ * 1 for the single object which is the result of an address of operation
You can’t perform that action at this time.
0 commit comments