URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 384 |
// Test support for ICF debugging.
|
// Test support for ICF debugging.
|
// { dg-do compile }
|
// { dg-do compile }
|
// { dg-options "-O0 -gdwarf-2 -fenable-icf-debug -dA" }
|
// { dg-options "-O0 -gdwarf-2 -fenable-icf-debug -dA" }
|
|
|
class A
|
class A
|
{
|
{
|
public:
|
public:
|
A();
|
A();
|
virtual void work();
|
virtual void work();
|
virtual int p();
|
virtual int p();
|
private:
|
private:
|
int i;
|
int i;
|
};
|
};
|
|
|
class B
|
class B
|
{
|
{
|
public:
|
public:
|
B();
|
B();
|
~B();
|
~B();
|
void work(const A* a);
|
void work(const A* a);
|
private:
|
private:
|
int j;
|
int j;
|
};
|
};
|
|
|
int
|
int
|
test1(A* a)
|
test1(A* a)
|
{
|
{
|
a->work();
|
a->work();
|
}
|
}
|
|
|
int
|
int
|
test2(A* a)
|
test2(A* a)
|
{
|
{
|
if (a->p())
|
if (a->p())
|
{
|
{
|
B b;
|
B b;
|
b.work(a);
|
b.work(a);
|
}
|
}
|
}
|
}
|
|
|
// Verify that we get .debug_dcall and .debug_vcall tables generated
|
// Verify that we get .debug_dcall and .debug_vcall tables generated
|
// and that we see entries for both virtual calls.
|
// and that we see entries for both virtual calls.
|
// { dg-final { scan-assembler "\\.section.*\.debug_dcall" } }
|
// { dg-final { scan-assembler "\\.section.*\.debug_dcall" } }
|
// { dg-final { scan-assembler "\\.section.*\.debug_vcall" } }
|
// { dg-final { scan-assembler "\\.section.*\.debug_vcall" } }
|
// { dg-final { scan-assembler "New caller" } }
|
// { dg-final { scan-assembler "New caller" } }
|
// { dg-final { scan-assembler "Caller DIE offset" } }
|
// { dg-final { scan-assembler "Caller DIE offset" } }
|
// { dg-final { scan-assembler "Point of call" } }
|
// { dg-final { scan-assembler "Point of call" } }
|
// { dg-final { scan-assembler "Callee DIE offset" } }
|
// { dg-final { scan-assembler "Callee DIE offset" } }
|
// { dg-final { scan-assembler "0x0.*Vtable slot" } }
|
// { dg-final { scan-assembler "0x0.*Vtable slot" } }
|
// { dg-final { scan-assembler "0x1.*Vtable slot" } }
|
// { dg-final { scan-assembler "0x1.*Vtable slot" } }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.