Skip to content

Commit 38c0679

Browse files
author
Daniel Kroening
committed
test from Dan
1 parent 8d68da3 commit 38c0679

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

regression/cbmc/Pointer_array4/main.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#include <assert.h>
2+
3+
int main()
4+
{
5+
int arrayOfIntegers[] = {1, 2, 3};
6+
int *pointer2FirstElem = arrayOfIntegers;
7+
int *pointer2ThirdElem = arrayOfIntegers + 2;
8+
int iFirst=(int)pointer2FirstElem;
9+
int iThird=(int)pointer2ThirdElem;
10+
int addrDiff = iThird-iFirst;
11+
assert(addrDiff == 2* sizeof(int));
12+
return 0;
13+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
main.c
3+
--32
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring

0 commit comments

Comments
 (0)