File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
regression/cbmc-incr-smt2/pointers-relational-operators Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ #include <stdlib.h>
2+
3+ int main ()
4+ {
5+ int x ;
6+ int * y = & x ;
7+ int * z = & x ;
8+
9+ if (x )
10+ {
11+ y ++ ;
12+ }
13+ else
14+ {
15+ z ++ ;
16+ }
17+
18+ __CPROVER_assume (y >= z );
19+ __CPROVER_assert (x != y , "x != y: expected successful" );
20+ __CPROVER_assert (x == y , "x == y: expected failure" );
21+
22+ __CPROVER_assume (z >= x );
23+
24+ __CPROVER_assert (z >= x , "z >= x: expected successful" );
25+ __CPROVER_assert (z <= y , "z <= y: expected successful" );
26+ __CPROVER_assert (z <= x , "z <= x: expected failure" );
27+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ pointers_assume.c
3+ --trace
4+ \[main\.assertion\.1\] line \d+ x != y: expected successful: SUCCESS
5+ \[main\.assertion\.2\] line \d+ x == y: expected failure: FAILURE
6+ \[main\.assertion\.3\] line \d+ z >= x: expected successful: SUCCESS
7+ \[main\.assertion\.4\] line \d+ z <= y: expected successful: SUCCESS
8+ \[main\.assertion\.5\] line \d+ z <= x: expected failure: FAILURE
9+ ^EXIT=10$
10+ ^SIGNAL=0$
11+ --
12+ --
13+ This is testing basic pointer relational operator support for three objects
14+ defined in the function's stack frame.
You can’t perform that action at this time.
0 commit comments