~ubuntu-branches/debian/sid/frama-c/sid

« back to all changes in this revision

Viewing changes to tests/misc/struct_incl.c

  • Committer: Bazaar Package Importer
  • Author(s): Mehdi Dogguy
  • Date: 2009-06-03 08:19:25 UTC
  • Revision ID: james.westby@ubuntu.com-20090603081925-kihvxvt0wy3zc4ar
Tags: upstream-20081201.dfsg
ImportĀ upstreamĀ versionĀ 20081201.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
struct st1 {
 
2
 int a;
 
3
 long b;
 
4
};
 
5
 
 
6
struct st2 {
 
7
 int a;
 
8
 int d[10];
 
9
 struct st1 b;
 
10
 struct st1 e[10];
 
11
 struct st2 *c;
 
12
};
 
13
 
 
14
struct st1 tabst[10], tabst2[10];
 
15
 
 
16
struct st2 tab_s[2];
 
17
struct st2 tab_s1[2];
 
18
struct st2 tab_s2[2];
 
19
struct st2 tab_s3[2];
 
20
struct st2 tab_s4[2];
 
21
 
 
22
struct st2 s1,s2,s4,s5,s6;
 
23
struct st1 s8,s7;
 
24
 
 
25
long x,y,z,t;
 
26
 
 
27
void main () {
 
28
  x = &s1.d[9];
 
29
  y = &s1.d[10];
 
30
  z = &s1.b;
 
31
 
 
32
 
 
33
  
 
34
  s1.a=2;
 
35
  s1.c = &s1;
 
36
  s1.d[0] = 2;
 
37
  s1.d[1] = 2;
 
38
  s1.d[2] = 2;
 
39
 
 
40
  s1.b.a = 3;
 
41
 
 
42
  s1.d[5] = 7;
 
43
 
 
44
 
 
45
  s1.d[8] = 8;
 
46
  s1.d[9] = 8;
 
47
 
 
48
  s1.d[10] = 777;
 
49
 
 
50
}