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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [overload/] [reftemp2.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 693 jeremybenn
// DR 391 says that we always bind a reference to the base subobject; it is
2
// incorrect to call the A copy constructor to initialize the parameter of
3
// f.
4
 
5
int fail;
6
 
7
struct A {
8
  A() { }
9
  A(const A&) { fail = 1; }
10
};
11
struct B : public A { };
12
struct X {
13
  operator B() { return B(); }
14
};
15
X x;
16
 
17
void f (const A&) { }
18
 
19
int main()
20
{
21
  f(x);
22
  return fail;
23
}

powered by: WebSVN 2.1.0

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