1 #include <stdio.h>
2 
3 int
main()4 main() {
5 	/* Check with more than one storage unit, and whether
6 	 * mixing with ordinary char at end works and still
7 	 * aligns properly
8 	 */
9 	struct foo {
10 		unsigned	a:3;
11 		unsigned	b:4;	/* 7 */
12 		unsigned	c:3;	/* 12 */
13 		unsigned	d:17;	/* 29 */
14 		/* unit boundary on x86 */
15 		unsigned	f:31;	/* 32-63 */
16 		unsigned	g:1;	/* 64 */
17 		char		x; /* align me */
18 	} ;
19 	struct foo	fa[] = {
20 		{ 1, 12, 2, 0x462, 0xefefef, 1, 33 }
21 	};
22 	int	i;
23 
24 	printf("%u\n", fa[0].f);
25 	printf("%u, %u\n", fa[0].f , fa[0].g);
26 	return 0;
27 }
28 
29