Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / ref4.C
blob5eb97b9884378a17b40f15d8f4630ac1ccc55fe5
1 // { dg-do assemble  }
3 // Copyright (C) 2001 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 27 Feb 2001 <nathan@codesourcery.com>
6 // Bug 2117. A conversion op to reference type created a temporary, even
7 // when bound to another reference.
9 struct Abstract
11   virtual void Foo () = 0;
14 struct Proxy
16   operator Abstract & ();
17   Abstract &Convert ();
20 void Baz (Abstract &);
22 void Foo ()
24   Proxy proxy;
25   
26   Baz (proxy);
27   Baz (proxy.Convert ());