Showing error 1514

User: Jiri Slaby
Error type: Reachable Error Location
Error type description: A specified error location is reachable in some program path
File location: loops/sum02_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}
 7extern unsigned int __VERIFIER_nondet_uint();
 8int main() {
 9  unsigned int i, n=__VERIFIER_nondet_uint(), sn=0;
10  for(i=0; i<=n; i++) {
11    sn = sn + i;
12  }
13  __VERIFIER_assert(sn==(n*(n+1))/2 || sn == 0);
14}