1 // { dg-do assemble }
2 //
3 // Copyright (C) 2001 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 24 April 2001 <nathan@codesourcery.com>
5
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.
9
10 struct A
11 {
12 A (int, int);
13 };
14
15 A::A (int d, int = 0)
16 {
17 if (d)
18 {
19 A a (0);
20 }
21 }
22
get_width()23 void get_width ()
24 {
25 A a (1);
26 }
27
28 struct B : A
29 {
30 B ();
31 };
B()32 B::B ()
33 :A (1)
34 {
35 }
36
37 struct C : virtual A
38 {
39 C (int, int);
40 };
41 C::C (int, int = 0)
42 :A (1)
43 {
44 }
45 struct D: C
46 {
47 D ();
48 };
D()49 D::D ()
50 :A (0), C (0)
51 {
52 }
53