1 // { dg-do assemble  }
2 // GROUPS passed conversions
3 // cvt file
4 // Message-Id: <1992Jul31.142856.10082@ericsson.se>
5 // From: jonas@ericsson.se (Jonas Nygren)
6 // Subject: g++ bug
7 // Date: Fri, 31 Jul 1992 14:28:56 GMT
8 
9 class A {};
10 class B : public A {};
11 
12 B b;
13 
14 class R{
15 public:
R()16   R() {}
17   operator B&() { return b; }
18 };
19 
f(A &)20 void f(A&) {}
21 
main()22 int main(){
23   R r;
24 
25   f(r); // problem to cast to B& and then to A&
26 }
27 
28 
29