Showing error 1516

User: Jiri Slaby
Error type: Reachable Error Location
Error type description: A specified error location is reachable in some program path
File location: loops/sum03_unsafe.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
 8extern unsigned int __VERIFIER_nondet_uint();
 9
10int main() {
11  int sn=0;
12  unsigned int loop1=__VERIFIER_nondet_uint(), n1=__VERIFIER_nondet_uint();
13  unsigned int x=0;
14
15  while(1){
16    if (x<10)
17      sn = sn + (2);
18    x++;
19    __VERIFIER_assert(sn==x*(2) || sn == 0);
20  }
21}