Skip to content

Commit f891e77

Browse files
committed
Add original test case as a regression test in ansi-c/ folder.
1 parent cc63bde commit f891e77

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
struct Foo1
2+
{
3+
__CPROVER_bitvector[1] m_array[2];
4+
};
5+
struct Foo8
6+
{
7+
__CPROVER_bitvector[8] m_array[2];
8+
};
9+
10+
int main(void)
11+
{
12+
struct Foo1 f1;
13+
struct Foo8 f8;
14+
15+
__CPROVER_assert(f1.m_array[1] == *(f1.m_array + 1), "");
16+
__CPROVER_assert(f8.m_array[1] == *(f8.m_array + 1), "");
17+
return 0;
18+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
CORE
2+
deref.c
3+
4+
^EXIT=1$
5+
^SIGNAL=0$
6+
only bitvectors of size multiple of 8 can be dereferenced
7+
^CONVERSION ERROR$
8+
--
9+
--
10+
This is checking that dereferenced __CPROVER_bitvectors always have a size
11+
that is a multiple of 8.
12+
13+
For more information, please have a look at https://github.com/diffblue/cbmc/issues/7104

0 commit comments

Comments
 (0)