PR testsuite/52641
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-fre-10.c
blob34217a0298a672a6f95e6c99e5c2b9ab57c67a2c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-pre-stats" } */
4 union loc { unsigned reg; signed offset; };
5 void __frame_state_for (volatile char *state_in, int x)
7 /* We should move all the loads out of this loop. Right now, we only
8 move one. It takes two insertions because we insert a cast. */
9 union loc fs;
10 int reg;
11 for (;;) {
12 switch (x) {
13 case 0:
14 *state_in = fs.reg;
15 case 1:
16 *state_in = fs.offset;
21 /* This is a weird testcase. It should need PPRE to hoist the loop
22 invariants and the volatileness of state_in prevents DSE of the
23 first store. Thus, this is XFAILed. */
25 /* { dg-final { scan-tree-dump "Insertions: 2" "pre" { xfail *-*-* } } } */
26 /* { dg-final { cleanup-tree-dump "pre" } } */