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++.law/] [cvt5.C] - Rev 154
Compare with Previous | Blame | View Log
// { dg-do assemble }
// GROUPS passed conversions
// cvt file
// Message-Id: <1992Jul31.142856.10082@ericsson.se>
// From: jonas@ericsson.se (Jonas Nygren)
// Subject: g++ bug
// Date: Fri, 31 Jul 1992 14:28:56 GMT
class A {};
class B : public A {};
B b;
class R{
public:
R() {}
operator B&() { return b; }
};
void f(A&) {}
int main(){
R r;
f(r); // problem to cast to B& and then to A&
}