File tree Expand file tree Collapse file tree 8 files changed +130
-0
lines changed
pointer-function-parameters-3
pointer-function-parameters-4
pointer-function-parameters-5
pointer-function-parameters-6 Expand file tree Collapse file tree 8 files changed +130
-0
lines changed Original file line number Diff line number Diff line change 1+ #include <assert.h>
2+ #include <stdlib.h>
3+
4+ typedef struct st
5+ {
6+ int data ;
7+ } st_t ;
8+
9+ st_t dummy ;
10+
11+ void func (st_t * p )
12+ {
13+ assert (p != NULL );
14+ assert (p != & dummy );
15+ assert (p -> data >= 4854549 );
16+ assert (p -> data < 4854549 );
17+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --function func --min-null-tree-depth 10
4+ ^SIGNAL=0$
5+ \[func.assertion.1\] assertion p != .*((NULL)|0).*: SUCCESS
6+ \[func.assertion.2\] assertion p != &dummy: SUCCESS
7+ \[func.assertion.3\] assertion p->data >= 4854549: FAILURE
8+ \[func.assertion.4\] assertion p->data < 4854549: FAILURE
9+ --
10+ ^warning: ignoring
Original file line number Diff line number Diff line change 1+ #include <assert.h>
2+ #include <stdlib.h>
3+
4+ typedef struct st
5+ {
6+ struct st * next ;
7+ int data ;
8+ } st_t ;
9+
10+ st_t dummy ;
11+
12+ void func (st_t * p )
13+ {
14+ assert (p != NULL );
15+ assert (p -> next != NULL );
16+ assert (p -> next -> next != NULL );
17+ assert (p -> next -> next -> next == NULL );
18+
19+ assert (p != & dummy );
20+ assert (p -> next != & dummy );
21+ assert (p -> next -> next != & dummy );
22+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --function func --min-null-tree-depth 10 --max-nondet-tree-depth 3 --pointer-check
4+ ^EXIT=0$
5+ ^SIGNAL=0$
6+ VERIFICATION SUCCESSFUL
7+ --
8+ ^warning: ignoring
Original file line number Diff line number Diff line change 1+ #include <assert.h>
2+ #include <stdlib.h>
3+
4+ typedef struct st
5+ {
6+ struct st * next ;
7+ struct st * prev ;
8+ int data ;
9+ } st_t ;
10+
11+ st_t dummy ;
12+
13+ void func (st_t * p )
14+ {
15+ assert (p != NULL );
16+ assert (p != & dummy );
17+
18+ assert (p -> prev != NULL );
19+ assert (p -> prev != & dummy );
20+
21+ assert (p -> next != NULL );
22+ assert (p -> next != & dummy );
23+
24+ assert (p -> prev -> prev == NULL );
25+ assert (p -> prev -> next == NULL );
26+ assert (p -> next -> prev == NULL );
27+ assert (p -> next -> next == NULL );
28+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --function func --min-null-tree-depth 10 --max-nondet-tree-depth 2 --pointer-check
4+ ^EXIT=0$
5+ ^SIGNAL=0$
6+ VERIFICATION SUCCESSFUL
7+ --
8+ ^warning: ignoring
Original file line number Diff line number Diff line change 1+ #include <assert.h>
2+ #include <stdlib.h>
3+
4+ typedef struct st1
5+ {
6+ struct st2 * to_st2 ;
7+ int data ;
8+ } st1_t ;
9+
10+ typedef struct st2
11+ {
12+ struct st1 * to_st1 ;
13+ int data ;
14+ } st2_t ;
15+
16+ st1_t dummy1 ;
17+ st2_t dummy2 ;
18+
19+ void func (st1_t * p )
20+ {
21+ assert (p != NULL );
22+ assert (p -> to_st2 != NULL );
23+ assert (p -> to_st2 -> to_st1 != NULL );
24+ assert (p -> to_st2 -> to_st1 -> to_st2 == NULL );
25+
26+ assert (p != & dummy1 );
27+ assert (p -> to_st2 != & dummy2 );
28+ assert (p -> to_st2 -> to_st1 != & dummy1 );
29+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --function func --min-null-tree-depth 10 --max-nondet-tree-depth 3 --pointer-check
4+ ^EXIT=0$
5+ ^SIGNAL=0$
6+ VERIFICATION SUCCESSFUL
7+ --
8+ ^warning: ignoring
You can’t perform that action at this time.
0 commit comments