URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [template41.C] - Rev 154
Compare with Previous | Blame | View Log
// { dg-do run }
// PRMS Id: 11420
// Bug: Can't handle indirect virtual template base init.
extern "C" int printf (const char *, ...);
template<class T>
class Vbase {
public:
Vbase(T i) { printf ("%d\n", i); }
};
template<class T>
class D1 : virtual public Vbase<T> {
public:
D1(T i) : Vbase<T>(i) {}
};
template<class T>
class D2 : virtual public Vbase<T> {
public:
D2(T i) : Vbase<T>(i) {}
};
template<class T>
class Most : public D1<T>, public D2<T> {
public:
Most(T i) : D1<T>(i), D2<T>(i), Vbase<T>(i) {}
};
int main () {
Most<int> x(2);
return 0;
}