URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 338 |
// Test to make sure that we keep searching if we don't find the type we
|
// Test to make sure that we keep searching if we don't find the type we
|
// want at the expected address.
|
// want at the expected address.
|
|
|
// { dg-do run }
|
// { dg-do run }
|
|
|
struct A
|
struct A
|
{
|
{
|
virtual void f() {};
|
virtual void f() {};
|
};
|
};
|
|
|
struct B: A { };
|
struct B: A { };
|
|
|
struct C: A { };
|
struct C: A { };
|
|
|
struct D: B, C { };
|
struct D: B, C { };
|
|
|
int main()
|
int main()
|
{
|
{
|
D d;
|
D d;
|
A* ap = static_cast(&d);
|
A* ap = static_cast(&d);
|
C* cp = dynamic_cast(ap);
|
C* cp = dynamic_cast(ap);
|
if (cp == 0)
|
if (cp == 0)
|
return 1;
|
return 1;
|
else
|
else
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.