gcc/testsuite/gcc.dg/torture/pr86034.c
raw| 1 | /* PR tree-optimization/86034 */ |
| 2 | /* Testcase by Zhendong Su <[email protected]> */ |
| 3 | |
| 4 | /* { dg-do run } */ |
| 5 | |
| 6 | typedef int int32_t __attribute__((mode (__SI__))); |
| 7 | |
| 8 | struct A |
| 9 | { |
| 10 | int32_t b; |
| 11 | int32_t c:24; |
| 12 | int32_t d:10; |
| 13 | int32_t e; |
| 14 | } f; |
| 15 | |
| 16 | int32_t g; |
| 17 | |
| 18 | void h () |
| 19 | { |
| 20 | struct A i = { 0, 0, -1, 0 }; |
| 21 | L: |
| 22 | f = i; |
| 23 | i.d = 0; |
| 24 | if (g < 0) |
| 25 | goto L; |
| 26 | } |
| 27 | |
| 28 | int main (void) |
| 29 | { |
| 30 | h (); |
| 31 | if (f.e != 0) |
| 32 | __builtin_abort (); |
| 33 | return 0; |
| 34 | } |