URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr36960.C] - Rev 774
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
struct Lower {
const int& ref;
Lower(const int& ref) : ref(ref) { }
};
struct Middle : public virtual Lower {
Middle(const int& ref) : Lower(ref) { }
};
struct Upper : public Middle {
Upper(const int& ref) : Lower(ref), Middle(ref) { }
int get() { return ref; }
};
extern "C" void abort (void);
int main()
{
int i = 0;
Upper upper(i);
if (upper.get() != 0)
abort ();
return 0;
}
Go to most recent revision | Compare with Previous | Blame | View Log