aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/comdat4.C
blob: 28b26a1df24f4b3a725f1e29d429f485325caacb (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
50
51
52
53
54
55
56
57
// PR c++/16276
// { dg-do link }
// { dg-additional-sources " comdat4-aux.cc" }
// { dg-options "-O2" }

extern void
bar (int x);

inline void
foo (int i)
{
  switch (i)
    {
    case 3:
    case 5:
    case 6:
    case 9:
    case 15:
      bar (1);
      break;
    case 2:
    case 4:
    case 7:
    case 10:
    case 11:
    case 12:
      bar (2);
      break;
    case 0:
    case 1:
    case 8:
    case 13:
    case 16:
      bar (3);
      break;
    case 14:
      bar (4);
      break;
    default:
      bar (5);
      break;
    }
}

void *fooaddr = (void *) foo;

void
bar (int x)
{
  __asm __volatile ("" : : "r" (x));
}

int
main (void)
{
  return 0;
}