URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 338 |
// { dg-do compile }
|
// { dg-do compile }
|
|
|
struct A {};
|
struct A {};
|
|
|
template struct B
|
template struct B
|
{
|
{
|
T a, b;
|
T a, b;
|
B() {}
|
B() {}
|
B(T x, T y) : a(x), b(y) {}
|
B(T x, T y) : a(x), b(y) {}
|
template operator B () const
|
template operator B () const
|
{ return B((U)(this->a), (U)(this->b)); }
|
{ return B((U)(this->a), (U)(this->b)); }
|
};
|
};
|
|
|
template struct C : public B
|
template struct C : public B
|
{
|
{
|
T *c;
|
T *c;
|
inline T & operator *() { return *c; }
|
inline T & operator *() { return *c; }
|
};
|
};
|
|
|
template struct D : virtual public C { };
|
template struct D : virtual public C { };
|
|
|
void
|
void
|
foo (D x)
|
foo (D x)
|
{
|
{
|
*x;
|
*x;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.