URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
// Test that typeid sees through references even when optimizing.
|
// Test that typeid sees through references even when optimizing.
|
// { dg-do run }
|
// { dg-do run }
|
// { dg-options "-O2" }
|
// { dg-options "-O2" }
|
|
|
#include
|
#include
|
|
|
struct A
|
struct A
|
{
|
{
|
virtual ~A() { }
|
virtual ~A() { }
|
};
|
};
|
|
|
class B : public A { };
|
class B : public A { };
|
|
|
int main ()
|
int main ()
|
{
|
{
|
B b;
|
B b;
|
A &aref = b;
|
A &aref = b;
|
|
|
return typeid (aref) != typeid (b);
|
return typeid (aref) != typeid (b);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.