1 /* { dg-options "-Og -fPIC -fschedule-insns2 -fselective-scheduling2 -fno-tree-fre --param=max-sched-extend-regions-iters=10" } */
2 /* { dg-require-effective-target scheduling } */
3 /* { dg-require-effective-target fpic } */
4 void bar (unsigned int);
5 
6 void
foo(void)7 foo (void)
8 {
9   char buf[1] = { 3 };
10   const char *p = buf;
11   const char **q = &p;
12   unsigned int ch;
13   switch (**q)
14     {
15     case 1:  ch = 5; break;
16     case 2:  ch = 4; break;
17     case 3:  ch = 3; break;
18     case 4:  ch = 2; break;
19     case 5:  ch = 1; break;
20     default: ch = 0; break;
21     }
22   bar (ch);
23 }
24