OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [debug/] [dwarf2/] [icf.C] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// Test support for ICF debugging.
2
// { dg-do compile }
3
// { dg-options "-O0 -gdwarf-2 -fenable-icf-debug -dA" }
4
 
5
class A
6
{
7
 public:
8
  A();
9
  virtual void work();
10
  virtual int p();
11
 private:
12
  int i;
13
};
14
 
15
class B
16
{
17
 public:
18
  B();
19
  ~B();
20
  void work(const A* a);
21
 private:
22
  int j;
23
};
24
 
25
int
26
test1(A* a)
27
{
28
  a->work();
29
}
30
 
31
int
32
test2(A* a)
33
{
34
  if (a->p())
35
    {
36
      B b;
37
      b.work(a);
38
    }
39
}
40
 
41
// Verify that we get .debug_dcall and .debug_vcall tables generated
42
// and that we see entries for both virtual calls.
43
// { dg-final { scan-assembler "\\.section.*\.debug_dcall" } }
44
// { dg-final { scan-assembler "\\.section.*\.debug_vcall" } }
45
// { dg-final { scan-assembler "New caller" } }
46
// { dg-final { scan-assembler "Caller DIE offset" } }
47
// { dg-final { scan-assembler "Point of call" } }
48
// { dg-final { scan-assembler "Callee DIE offset" } }
49
// { dg-final { scan-assembler "0x0.*Vtable slot" } }
50
// { dg-final { scan-assembler "0x1.*Vtable slot" } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.