FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / defarg9.C
blobf3b0a48c361832a655f1c0ad01b324e85c503bfd
1 // Build don't link:
2 // 
3 // Copyright (C) 2001 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 24 April 2001 <nathan@codesourcery.com>
6 // Bug 2608. A default parameter introduced in the definition of a
7 // ctor never made it into the clones, leading to later overload
8 // resolution failures. This is related to bug 2356.
10 struct A
12   A (int, int);
15 A::A (int d, int = 0)
17   if (d)
18     {
19       A a (0);
20     }
23 void get_width ()
25   A a (1);
28 struct B : A
30   B ();
32 B::B ()
33   :A (1)
37 struct C : virtual A
39   C (int, int);
41 C::C (int, int = 0)
42   :A (1)
45 struct D: C
47   D ();
49 D::D ()
50   :A (0), C (0)