source: CIVL/examples/svcomp17/int2pointerOnSymConst.cvl@ 65582ca

1.23 2.0 main test-branch
Last change on this file since 65582ca was 368903b1, checked in by Ziqing Luo <ziqing@…>, 9 years ago

commit a minimal test for a CIVL bug: int2pointer casting on symbolic constants

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@3805 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 210 bytes
Line 
1int foo(void *p) {
2 void * q[5];
3
4 q[0] = p; // where bug happens
5
6 return (int*)q[0] - (int*)p; // ignore this, just for not pruning
7
8}
9
10int main() {
11 int a;
12
13 $havoc(&a);
14 return foo((void*)a);
15}
Note: See TracBrowser for help on using the repository browser.