summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr52139.c
blob: d10adf2b6fb0b76c33fda5b1473e342ff7be1539 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* PR rtl-optimization/52139 */
/* { dg-do compile } */
/* { dg-options "-O -fno-tree-dominator-opts -fno-tree-fre" } */
/* { dg-options "-O -fno-tree-dominator-opts -fno-tree-fre -fpic" { target fpic } } */

void *p;

void
foo (int a)
{
  switch (a)
    {
    case 0:
    a0:
    case 1:
    a1:
      p = &&a1;
    case 2:
    a2:
      p = &&a2;
    case 3:
    a3:
      p = &&a3;
    case 4:
    a4:
      p = &&a4;
    case 5:
    a5:
      p = &&a5;
    case 6:
    a6:
      p = &&a6;
    case 7:
    a7:
      p = &&a7;
    case 8:
    a8:
      p = &&a8;
    case 9:
    a9:
      p = &&a9;
    case 10:
    a10:
      p = &&a10;
    default:
      p = &&a0;
    }
  goto *p;
}