URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [copy2.C] - Rev 12
Compare with Previous | Blame | View Log
// { dg-do run }
// Origin: Mark Mitchell <mark@codesourcery.com>
int i;
struct B {
B () {}
B (B&) { i = 1; }
B (const B&) { i = 2; }
};
struct D : public B {
D () {}
};
int main ()
{
D d;
D d2 (d);
if (i != 2)
return 1;
}