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
10struct A
11{
12  A (int, int);
13};
14
15A::A (int d, int = 0)
16{
17  if (d)
18    {
19      A a (0);
20    }
21}
22
23void get_width ()
24{
25  A a (1);
26}
27
28struct B : A
29{
30  B ();
31};
32B::B ()
33  :A (1)
34{
35}
36
37struct C : virtual A
38{
39  C (int, int);
40};
41C::C (int, int = 0)
42  :A (1)
43{
44}
45struct D: C
46{
47  D ();
48};
49D::D ()
50  :A (0), C (0)
51{
52}
53