Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr40493.c
blobc30786525eaea247d1931a3b9bdb9f3c83b77ed7
1 extern void abort (void);
3 typedef union i386_operand_type
5 struct
7 unsigned int reg8:1;
8 unsigned int reg16:1;
9 unsigned int reg32:1;
10 unsigned int reg64:1;
11 unsigned int floatreg:1;
12 unsigned int regmmx:1;
13 unsigned int regxmm:1;
14 unsigned int regymm:1;
15 unsigned int control:1;
16 unsigned int debug:1;
17 unsigned int test:1;
18 unsigned int sreg2:1;
19 unsigned int sreg3:1;
20 unsigned int imm1:1;
21 unsigned int imm8:1;
22 unsigned int imm8s:1;
23 unsigned int imm16:1;
24 unsigned int imm32:1;
25 unsigned int imm32s:1;
26 unsigned int imm64:1;
27 unsigned int disp8:1;
28 unsigned int disp16:1;
29 unsigned int disp32:1;
30 unsigned int disp32s:1;
31 unsigned int disp64:1;
32 unsigned int acc:1;
33 unsigned int floatacc:1;
34 unsigned int baseindex:1;
35 unsigned int inoutportreg:1;
36 unsigned int shiftcount:1;
37 unsigned int jumpabsolute:1;
38 unsigned int esseg:1;
39 unsigned int regmem:1;
40 unsigned int mem:1;
41 unsigned int byte:1;
42 unsigned int word:1;
43 unsigned int dword:1;
44 unsigned int fword:1;
45 unsigned int qword:1;
46 unsigned int tbyte:1;
47 unsigned int xmmword:1;
48 unsigned int ymmword:1;
49 unsigned int unspecified:1;
50 unsigned int anysize:1;
51 } bitfield;
52 unsigned int array[2];
53 } i386_operand_type;
55 unsigned int x00, x01, y00, y01;
57 int main (int argc, char *argv[])
59 i386_operand_type a,b,c,d;
61 a.bitfield.reg16 = 1;
62 a.bitfield.imm16 = 0;
63 a.array[1] = 22;
65 b = a;
66 x00 = b.array[0];
67 x01 = b.array[1];
69 c = b;
70 y00 = c.array[0];
71 y01 = c.array[1];
73 d = c;
74 if (d.bitfield.reg16 != 1)
75 abort();
76 if (d.bitfield.imm16 != 0)
77 abort();
78 if (d.array[1] != 22)
79 abort();
81 return 0;