Fix up recent entries by espindola.
[official-gcc.git] / gcc / testsuite / consistency.vlad / layout / f-16-30-15.c
blobc4de6e2dfbbc58cdf1a1d71c32ddc0153b3dfb86
1 #include <stdio.h>
3 struct sss{
4 int i1:16;
5 int i2:30;
6 int i3:15;
7 };
9 static union u{
10 struct sss sss;
11 unsigned char a[sizeof (struct sss)];
12 } u;
14 int main (void) {
15 int i;
16 for (i = 0; i < sizeof (struct sss); i++)
17 u.a[i] = 0;
18 u.sss.i1 = 65535.0;
19 for (i = 0; i < sizeof (struct sss); i++)
20 printf ("%x ", u.a[i]);
21 printf ("\n");
22 u.sss.i2 = 1073741823.0;
23 for (i = 0; i < sizeof (struct sss); i++)
24 printf ("%x ", u.a[i]);
25 printf ("\n");
26 u.sss.i3 = 32767.0;
27 for (i = 0; i < sizeof (struct sss); i++)
28 printf ("%x ", u.a[i]);
29 printf ("\n");
30 return 0;