projects
/
libfirm
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
indentation fixed
[libfirm]
/
ir
/
be
/
test
/
union_init.c
1
typedef union blub {
2
int i;
3
char a[4];
4
} blub;
5
6
blub a = {
7
.i = 23,
8
.a[2] = 23, 19
9
};
10
11
blub b = {
12
.a[2] = 23, 19,
13
.i = 23
14
};
15
16
#if 0
17
blub c = {
18
.a[2] = 23, 19, 17,
19
.i = 23
20
};
21
#endif
22
23
blub d = {
24
.a[2] = 23,
25
.i = 23,
26
.a[3] = 19
27
};
28
29
blub e = {
30
.a[2] = 23,
31
.i = 23,
32
.a[2] = 19, 23
33
};
34
35
blub f = {
36
.i = 23,
37
.a[2] = 23,
38
.a[1] = 19
39
};
40
41
int main(void)
42
{
43
printf("%d %d %d %d\n", a.a[0], a.a[1], a.a[2], a.a[3]);
44
printf("%d\n", b.i);
45
printf("%d %d %d %d\n", d.a[0], d.a[1], d.a[2], d.a[3]);
46
printf("%d %d %d %d\n", e.a[0], e.a[1], e.a[2], e.a[3]);
47
printf("%d %d %d %d\n", f.a[0], f.a[1], f.a[2], f.a[3]);
48
return 0;
49
}