OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [ref4.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
 
3
// Copyright (C) 2001 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 27 Feb 2001 
5
 
6
// Bug 2117. A conversion op to reference type created a temporary, even
7
// when bound to another reference.
8
 
9
struct Abstract
10
{
11
  virtual void Foo () = 0;
12
};
13
 
14
struct Proxy
15
{
16
  operator Abstract & ();
17
  Abstract &Convert ();
18
};
19
 
20
void Baz (Abstract &);
21
 
22
void Foo ()
23
{
24
  Proxy proxy;
25
 
26
  Baz (proxy);
27
  Baz (proxy.Convert ());
28
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.