1 // { dg-do assemble  }
2 // GROUPS passed constructors
3 // ctor file
4 // From: mkohtala@vinkku.hut.fi
5 // Date: Tue, 5 Oct 1993 19:31:16 +0200
6 // Message-Id: <199310051731.AA12260@lk-hp-11.hut.fi>
7 // Subject: Nested class constructor calling bug
8 
9 class X
10 {
11   public:
12     class Y
13     {
14       public:
Y(int i)15         Y(int i) : a(i) {}
16         int a;
17     };
18     static void f(Y y);
19 };
20 
f(X::Y y)21 void X::f(X::Y y)
22 {
23 }
24 
25 int
main()26 main()
27 {
28     X::Y y = X::Y(1);   // Tries to call ctor Y instead of X::Y
29     X::f(X::Y(2));      // Tries to call Y instead of X::Y
30 
31     return 0;
32 }
33 
34