gcc/testsuite/gcc.c-torture/execute/pr57344-4.c
raw| 1 | /* PR middle-end/57344 */ |
| 2 | |
| 3 | struct __attribute__((packed)) S |
| 4 | { |
| 5 | long long int a : 59; |
| 6 | long long int b : 54; |
| 7 | char c; |
| 8 | long long int : 0; |
| 9 | } s[2]; |
| 10 | int i; |
| 11 | |
| 12 | __attribute__((noinline, noclone)) void |
| 13 | foo (long long int x) |
| 14 | { |
| 15 | if (x != -1220975898975746LL) |
| 16 | __builtin_abort (); |
| 17 | asm volatile ("" : : : "memory"); |
| 18 | } |
| 19 | |
| 20 | int |
| 21 | main () |
| 22 | { |
| 23 | struct S t = { 0, -1220975898975746LL }; |
| 24 | s[1] = t; |
| 25 | for (; i < 1; i++) |
| 26 | foo (s[1].b); |
| 27 | return 0; |
| 28 | } |