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/] [p3068.C] - Rev 414
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
// prms-id: 3068
extern "C" int printf(const char *, ...);
extern "C" void exit(int);
class LB {
public:
virtual int test() { return 0; }
virtual ~LB() { }
protected:
LB() { }
};
class RRB {
public:
virtual ~RRB() { }
virtual void test2(int a) { }
};
class RR : public RRB {
public:
virtual ~RR() { }
};
class RL {
public:
virtual void real(int a) {
printf("RL::real\n");
}
};
class R : public RL, public RR {
public:
virtual void test3(int a) { }
virtual void test2(int a) { }
};
class L : public LB {
};
class C : public L, public R {
public:
C() { }
virtual ~C() {
printf("C::~C\n");
exit(1);
}
virtual void real(int a) {
printf("RL::real\n");
}
};
int main() {
C& bb = *new C;
R& mv = bb;
bb.real(0);
mv.real(0);
return 0;
}
Go to most recent revision | Compare with Previous | Blame | View Log