gcc/testsuite/gcc.dg/torture/pr48124-2.c
raw| 1 | /* { dg-do run } */ |
| 2 | |
| 3 | extern void abort (void); |
| 4 | |
| 5 | static volatile struct S0 { |
| 6 | short f3[9]; |
| 7 | unsigned f8 : 15; |
| 8 | } s = {1}; |
| 9 | static unsigned short sh = 0x1234; |
| 10 | |
| 11 | struct S0 a, b; |
| 12 | int vi = 0; |
| 13 | |
| 14 | void func_4() |
| 15 | { |
| 16 | s.f8 |= 1; |
| 17 | sh = 15; |
| 18 | if (vi) a = b; |
| 19 | } |
| 20 | |
| 21 | int main() |
| 22 | { |
| 23 | func_4(); |
| 24 | if (sh != 15) |
| 25 | abort (); |
| 26 | return 0; |
| 27 | } |