Skip to content

Commit

Permalink
A test case which demonstrates the problem
Browse files Browse the repository at this point in the history
  • Loading branch information
martin authored and martin-cs committed Feb 2, 2024
1 parent 5bdff46 commit 6b830fd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
15 changes: 15 additions & 0 deletions regression/goto-analyzer/recursion-01/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
int nondet_int(void);

void rec ( void ) {
if (nondet_int()) {
rec();
__CPROVER_assert(0, "Clearly reachable");
}
return;
}

int main()
{
rec();
return 0;
}
10 changes: 10 additions & 0 deletions regression/goto-analyzer/recursion-01/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CORE
main.c
--verify --vsd
^EXIT=0$
^SIGNAL=0$
^\[main\.assertion\.1\] .* assertion y != 0: SUCCESS$
^\[main\.assertion\.2\] .* assertion y == 0: SUCCESS \(unreachable\)$
^\[main\.assertion\.3\] .* assertion z == 1: SUCCESS$
--
^warning: ignoring

0 comments on commit 6b830fd

Please sign in to comment.