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 |
// PR c++/13009
|
// PR c++/13009
|
// { dg-do run }
|
// { dg-do run }
|
|
|
struct A {
|
struct A {
|
char a;
|
char a;
|
};
|
};
|
|
|
struct B: public virtual A {
|
struct B: public virtual A {
|
#if 0 // this piece of code works around the problem
|
#if 0 // this piece of code works around the problem
|
B& operator= (const B& other)
|
B& operator= (const B& other)
|
{
|
{
|
A::operator= (other);
|
A::operator= (other);
|
}
|
}
|
#endif
|
#endif
|
};
|
};
|
|
|
struct C: public B {
|
struct C: public B {
|
char c;
|
char c;
|
};
|
};
|
|
|
int main() {
|
int main() {
|
B b;
|
B b;
|
b.a = 'b';
|
b.a = 'b';
|
C c;
|
C c;
|
c.a = c.c = 'c';
|
c.a = c.c = 'c';
|
|
|
c.B::operator= (b);
|
c.B::operator= (b);
|
if (c.a != 'b' || c.c != 'c')
|
if (c.a != 'b' || c.c != 'c')
|
return 1;
|
return 1;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.