blob: 523ee87004dd4a299276079bdde264adacfe6556 (
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
|
// Test support for ICF debugging.
// { dg-do compile }
// { dg-options "-O0 -gdwarf-2 -fenable-icf-debug -dA" }
class A
{
public:
A();
virtual void work();
virtual int p();
private:
int i;
};
class B
{
public:
B();
~B();
void work(const A* a);
private:
int j;
};
int
test1(A* a)
{
a->work();
}
int
test2(A* a)
{
if (a->p())
{
B b;
b.work(a);
}
}
// Verify that we get .debug_dcall and .debug_vcall tables generated
// and that we see entries for both virtual calls.
// { dg-final { scan-assembler "\\.section.*\.debug_dcall" { xfail mips-sgi-irix* } } }
// { dg-final { scan-assembler "\\.section.*\.debug_vcall" } }
// { dg-final { scan-assembler "New caller" { xfail mips-sgi-irix* } } }
// { dg-final { scan-assembler "Caller DIE offset" { xfail mips-sgi-irix* } } }
// { dg-final { scan-assembler "Point of call" } }
// { dg-final { scan-assembler "Callee DIE offset" { xfail mips-sgi-irix* } } }
// { dg-final { scan-assembler "0\[ \t\]+.*Vtable slot" } }
// { dg-final { scan-assembler "0x1\[ \t\]+.*Vtable slot" } }
|