URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.dg/] [overload/] [reftemp2.C] - Rev 384
Compare with Previous | Blame | View Log
// DR 391 says that we always bind a reference to the base subobject; it is
// incorrect to call the A copy constructor to initialize the parameter of
// f.
int fail;
struct A {
A() { }
A(const A&) { fail = 1; }
};
struct B : public A { };
struct X {
operator B() { return B(); }
};
X x;
void f (const A&) { }
int main()
{
f(x);
return fail;
}