gcc/testsuite/gcc.c-torture/execute/20100316-1.c
raw| 1 | struct Foo { |
| 2 | int i; |
| 3 | unsigned precision : 10; |
| 4 | unsigned blah : 3; |
| 5 | } f; |
| 6 | |
| 7 | int __attribute__((noinline,noclone)) |
| 8 | foo (struct Foo *p) |
| 9 | { |
| 10 | struct Foo *q = p; |
| 11 | return (*q).precision; |
| 12 | } |
| 13 | |
| 14 | extern void abort (void); |
| 15 | |
| 16 | int main() |
| 17 | { |
| 18 | f.i = -1; |
| 19 | f.precision = 0; |
| 20 | f.blah = -1; |
| 21 | if (foo (&f) != 0) |
| 22 | abort (); |
| 23 | return 0; |
| 24 | } |