Skip to content

Commit 941f001

Browse files
committed
Test whether frame conditions correctly consider scope
Signed-off-by: Felipe R. Monteiro <[email protected]>
1 parent 246af82 commit 941f001

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include <assert.h>
2+
3+
int x = 0;
4+
5+
void pure() __CPROVER_assigns()
6+
{
7+
int x;
8+
x++;
9+
}
10+
11+
int main()
12+
{
13+
pure();
14+
assert(x == 0);
15+
return 0;
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE
2+
main.c
3+
--enforce-all-contracts _ --pointer-primitive-check
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^\[main.assertion.\d+\] line \d+ assertion x \=\= 0\: SUCCESS$
7+
^VERIFICATION SUCCESSFUL$
8+
--
9+
--
10+
Checks whether verification correctly distincts local variables
11+
and global variables with same name when checking frame conditions.

0 commit comments

Comments
 (0)