Skip to content

Commit 3f7e416

Browse files
committed
Add string literal regression test
1 parent 6bef976 commit 3f7e416

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <assert.h>
2+
#include <stdint.h>
3+
4+
int main()
5+
{
6+
const char *my_string = "hello!";
7+
uint8_t index;
8+
__CPROVER_assume(index < 6);
9+
char element = my_string[index];
10+
assert(element != 'o');
11+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
CORE
2+
string_literal.c
3+
--trace
4+
Passing problem to incremental SMT2 solving
5+
line 10 assertion element \!\= \'o\'\: FAILURE
6+
index=4
7+
element='o'
8+
VERIFICATION FAILED
9+
^EXIT=10$
10+
^SIGNAL=0$
11+
--
12+
--
13+
Test of indexing into a string literal.

0 commit comments

Comments
 (0)