URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [rtti3.C] - Rev 414
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
class base {
public:
virtual ~base() {}
virtual void m1() = 0;
virtual void m2() = 0;
};
class intermediate : public virtual base {
public:
virtual ~intermediate() {}
virtual void m1() {}
virtual void m2() {}
};
class derived : public intermediate {
public:
virtual int IwantedThisMethod() { return 0; }
virtual int ButIgotThisOne() { return 1; }
};
int main() {
return derived().IwantedThisMethod();
}
Go to most recent revision | Compare with Previous | Blame | View Log