gcc/testsuite/gcc.c-torture/execute/980602-2.c
raw| 1 | void abort (void); |
| 2 | void exit (int); |
| 3 | |
| 4 | /* The bit-field below would have a problem if __INT_MAX__ is too |
| 5 | small. */ |
| 6 | #if __INT_MAX__ < 2147483647 |
| 7 | int |
| 8 | main (void) |
| 9 | { |
| 10 | exit (0); |
| 11 | } |
| 12 | #else |
| 13 | struct { |
| 14 | unsigned bit : 30; |
| 15 | } t; |
| 16 | |
| 17 | int main() |
| 18 | { |
| 19 | if (!(t.bit++)) |
| 20 | exit (0); |
| 21 | else |
| 22 | abort (); |
| 23 | } |
| 24 | #endif |