URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 338 |
// { dg-do run }
|
// { dg-do run }
|
// PRMS Id: 5184
|
// PRMS Id: 5184
|
// Bug: cast to C& below does not adjust address
|
// Bug: cast to C& below does not adjust address
|
|
|
struct A {};
|
struct A {};
|
struct B {
|
struct B {
|
virtual void foo () {}
|
virtual void foo () {}
|
};
|
};
|
struct C : public B, public A {};
|
struct C : public B, public A {};
|
|
|
int main() {
|
int main() {
|
C c;
|
C c;
|
|
|
A& ar = c;
|
A& ar = c;
|
C& cr = (C&)ar;
|
C& cr = (C&)ar;
|
|
|
cr.foo(); // this line causes core dump
|
cr.foo(); // this line causes core dump
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.