Showing error 1531

User: Jiri Slaby
Error type: Reachable Error Location
Error type description: A specified error location is reachable in some program path
File location: loops/trex02_safe.i
Line in file: 3
Project: SV-COMP 2013
Project version: 2.6.28
Tools: Manual Work
Entered: 2013-01-17 16:57:54 UTC


Source:

 1void __VERIFIER_assert(int cond) {
 2  if (!(cond)) {
 3    ERROR: goto ERROR;
 4  }
 5  return;
 6}
 7_Bool __VERIFIER_nondet_bool();
 8int __VERIFIER_nondet_int();
 9
10
11int x;
12
13void foo() {
14  x--;
15}
16
17int main() {
18  x=__VERIFIER_nondet_int();
19  while (x > 0) {
20    _Bool c = __VERIFIER_nondet_bool();
21    if(c) foo();
22    else foo();
23  }
24  __VERIFIER_assert(x<=0);
25}