fixed lots of warnings in testprograms
[libfirm] / ir / be / test / bitfield.c
1 #include <stdio.h>
2
3 struct a {
4         unsigned int i:1;
5 };
6
7 struct b {
8   int x:20;
9   int y:8;
10   int z:10;
11 };
12
13 struct b B = { 1, 2, 3 };
14 struct b C = { 1, 2, 3 };
15
16 int main()
17 {
18   printf("sizeof(struct a) = %zu\n", sizeof(struct a));
19   printf("sizeof(B) = %d\n", sizeof(B));
20
21   printf("x = %d\n", B.x);
22   printf("y = %d\n", B.y);
23   printf("z = %d\n", B.z);
24
25   B.y = C.z;
26
27   if (C.z)
28     return 0;
29
30   return 42;
31 }