Showing error 1386

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/nested_structure_ptr.c_safe.i
Line in file: 13
Project: SV-COMP 2013
Project version: 2.6.28
Tools: Manual Work
Entered: 2013-01-17 16:57:54 UTC


Source:

 1# 1 "files/nested_structure_ptr.c"
 2# 1 "<built-in>"
 3# 1 "<command-line>"
 4# 1 "files/nested_structure_ptr.c"
 5
 6
 7
 8
 9# 1 "./assert.h" 1
10
11void __blast_assert()
12{
13 ERROR: goto ERROR;
14}
15# 6 "files/nested_structure_ptr.c" 2
16
17
18
19typedef struct Toplev {
20 int a;
21 struct Inner {
22  int b;
23  struct Innermost{
24   int c;
25  } *y;
26 } *x;
27} Stuff;
28
29int main()
30{
31 struct Innermost im = {3};
32 struct Inner inner = {2, &im};
33 struct Toplev good = { 1, &inner};
34 struct Toplev *ptr = &good;
35 ptr->x->y->c = 4;
36 ((ptr->x->y->c == 4) ? (0) : __blast_assert ());
37 return 0;
38}