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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [expr/] [copy1.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/14035
2
// { dg-do run }
3
 
4
extern "C" void abort();
5
 
6
struct Blob {
7
  int x, y;
8
  Blob() { }
9
  Blob(const Blob &b) { abort (); }
10
};
11
struct Blobby : public Blob { };
12
 
13
struct Wooly {
14
  operator const Blobby & ()
15
  {
16
    return myBlobby;
17
  }
18
  Blobby myBlobby;
19
};
20
 
21
void catcher(const Blob &blo)
22
{ }
23
 
24
int main()
25
{
26
  Wooly wooly;
27
  catcher((const Blob &)wooly);
28
}

powered by: WebSVN 2.1.0

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