* gcc.target/i386/mpx/hard-reg-1-nov.c (mpx_test): Use "esp"
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 921204-1.c
bloba7bba830a34ca0f794986d772560e610d99c147e
1 /* The bit-field below would have a problem if __INT_MAX__ is too
2 small. */
3 #if __INT_MAX__ < 2147483647
4 int
5 main (void)
7 exit (0);
9 #else
10 typedef struct {
11 unsigned b0:1, f1:17, b18:1, b19:1, b20:1, f2:11;
12 } bf;
14 typedef union {
15 bf b;
16 unsigned w;
17 } bu;
20 f(bu i)
22 bu o = i;
24 if (o.b.b0)
25 o.b.b18 = 1,
26 o.b.b20 = 1;
27 else
28 o.b.b18 = 0,
29 o.b.b20 = 0;
31 return o;
34 main()
36 bu a;
37 bu r;
39 a.w = 0x4000000;
40 a.b.b0 = 0;
41 r = f(a);
42 if (a.w != r.w)
43 abort();
44 exit(0);
46 #endif