2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / copy2.C
blobc3e96e1030d426aa3727c842ed09d214d248d276
1 // { dg-do run  }
2 // Origin: Mark Mitchell <mark@codesourcery.com>
4 int i;
6 struct B {
7   B () {}
8   B (B&) { i = 1; }
9   B (const B&) { i = 2; }
12 struct D : public B {
13   D () {}
16 int main ()
18   D d;
19   D d2 (d);
20   if (i != 2)
21     return 1;