User: | Jiri Slaby |
Error type: | Reachable Error Location |
Error type description: | A specified error location is reachable in some program path |
File location: | bitvector/num_conversion_1_safe.i |
Line in file: | 4 |
Project: | SV-COMP 2013 |
Project version: | 2.6.28 |
Tools: |
Manual Work
|
Entered: | 2013-01-17 16:57:54 UTC |
1extern int nondet_int(void); 2void __VERIFIER_assert(int cond) { 3 if (!(cond)) { 4 ERROR: goto ERROR; 5 } 6 return; 7} 8 9 10int main() 11{ 12 unsigned char x; 13 unsigned char y; 14 unsigned char c; 15 16 x = 37; 17 y = 0; 18 c = 0; 19 while (c < (unsigned char)8) { 20 unsigned char i = ((unsigned char)1) << c; 21 unsigned char bit = x & i; 22 if (bit != (unsigned char)0) { 23 y = y + i; 24 } 25 c = c + ((unsigned char)1); 26 } 27 __VERIFIER_assert(x == y); 28 29 return 0; 30}