URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
// { dg-do run }
|
// { dg-do run }
|
// { dg-options "" }
|
// { dg-options "" }
|
// prms-id: 10148
|
// prms-id: 10148
|
|
|
int fail = 1;
|
int fail = 1;
|
void ok() { fail = 0; }
|
void ok() { fail = 0; }
|
|
|
class TC {
|
class TC {
|
int s_;
|
int s_;
|
};
|
};
|
|
|
class TIRD {
|
class TIRD {
|
public:
|
public:
|
void (*itc)();
|
void (*itc)();
|
TIRD() { itc = ok; }
|
TIRD() { itc = ok; }
|
};
|
};
|
|
|
class TCCB : public TC, public TIRD {
|
class TCCB : public TC, public TIRD {
|
};
|
};
|
|
|
class TCRCB : public TCCB {
|
class TCRCB : public TCCB {
|
public:
|
public:
|
virtual void eat ();
|
virtual void eat ();
|
};
|
};
|
|
|
void TCRCB::eat () {
|
void TCRCB::eat () {
|
void *vp = (void *)((TIRD*)this)->itc;
|
void *vp = (void *)((TIRD*)this)->itc;
|
this->itc();
|
this->itc();
|
}
|
}
|
|
|
int main() {
|
int main() {
|
TCRCB a;
|
TCRCB a;
|
a.eat();
|
a.eat();
|
return fail;
|
return fail;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.