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/] [p3139.C] - Rev 305
Compare with Previous | Blame | View Log
// { dg-do run }
// prms-id: 3139
extern "C" int printf(const char *, ...);
class A {
public:
A() { }
virtual int a() = 0;
};
class B : virtual public A {
public:
virtual int a() = 0;
};
class C : public B {
public:
int a() { return 42; }
};
int main() {
B * b = new C;
printf("%d.\n", b->a());
return 0;
}