summaryrefslogtreecommitdiff
path: root/util/romcc/tests/simple_test85.c
blob: f223e2e3a5bc126f191b4955a3bf99f22d52004b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
struct sub4 {
	unsigned a;
	unsigned b;
	unsigned c;
	unsigned d;
	unsigned e;
	unsigned f;
	unsigned g;
};
struct sub3 {
	unsigned a;
	unsigned b;
	unsigned c;
	unsigned d;
	unsigned e;
	unsigned f;
	struct sub4 s4;
};
struct sub2 {
	unsigned a;
	unsigned b;
	unsigned c;
	unsigned d;
	unsigned e;
	struct sub3 s3;
};
struct sub1 {
	unsigned a;
	unsigned b;
	struct sub2 s2;
};

struct stuff {
	signed int   a;
	signed int   b;
	signed int   c;
	unsigned int d;
	struct sub1  s1;
};


static void main(void)
{
	struct stuff *var;
	unsigned int *foo;

	var = (struct stuff *)(0x12345678);
	foo = &var->d;
	foo = &((*var).d);
	foo = &var->s1.s2.s3.s4.g;
}