1 // { dg-do run  }
2 // PRMS Id: 2139
3 // Bug: g++ tries to instantiate the template with types on the function
4 // obstack and fails.
5 
6 template<class T>
7 class X {
8 public:
X(int)9     X(int) { }
10 
11     T x;
12 };
13 
14 class A { };
15 
main()16 int main()
17 {
18     int i;
19     X<int> xi(i);
20     X<double> xd(i);
21 
22     X<int (*)(int, void *)> fp0(i);
23     X<int (*)(int, char, double)> fp1(i);
24     X<int (*)(int, double**, void *)> fp2(i);
25 
26     X<int (A::*)()> mp0 (i);
27     X<int A::*> mp1 (i);
28 }
29