gcc/testsuite/gcc.dg/tree-ssa/sra-20.c
raw| 1 | /* { dg-do compile { target int32plus } } */ |
| 2 | /* { dg-options "-O1 -Wall" } */ |
| 3 | /* PR/70013, SRA of constant-pool loads removes initialization of part of d. */ |
| 4 | #pragma pack (1) |
| 5 | struct S0 { |
| 6 | unsigned f0 : 17; |
| 7 | }; |
| 8 | |
| 9 | int c; |
| 10 | |
| 11 | int |
| 12 | main (int argc, char **argv) |
| 13 | { |
| 14 | struct S0 d[] = { { 1 }, { 2 } }; |
| 15 | struct S0 e = d[1]; |
| 16 | |
| 17 | c = d[0].f0; |
| 18 | __builtin_printf ("%x\n", e.f0); |
| 19 | return 0; |
| 20 | } |