2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 931031-1.c
blobe9ce337955d66926546bce89b1cf45c33d92e693
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 struct foo
12 unsigned y:1;
13 unsigned x:32;
16 int
17 f (x)
18 struct foo x;
20 int t = x.x;
21 if (t < 0)
22 return 1;
23 return t+1;
26 main ()
28 struct foo x;
29 x.x = -1;
30 if (f (x) == 0)
31 abort ();
32 exit (0);
34 #endif