PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-fre-10.c
blob7f2d1ebd1bbd726c2db5bfe34a718d142e99d08e
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 *-*-* } } } */