Showing error 1428

User: Jiri Slaby
Error type: Reachable Error Location
Error type description: A specified error location is reachable in some program path
File location: ldv-regression/test_union_cast-1_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
 8extern void __assert_fail (__const char *__assertion, __const char *__file,
 9      unsigned int __line, __const char *__function)
10     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
11extern void __assert_perror_fail (int __errnum, __const char *__file,
12      unsigned int __line,
13      __const char *__function)
14     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
15extern void __assert (const char *__assertion, const char *__file, int __line)
16     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
17
18int CURRENTLY_SAFE;
19union X
20{
21  int y;
22  double z;
23};
24
25
26
27
28
29
30int main(void) {
31
32 union X var;
33 var.z = 0x1.4p+4;
34 var.y = 10u;
35 __VERIFIER_assert(var.y==10u);
36
37
38
39
40
41
42 return 0;
43}