1// PR c++/26261
2// { dg-final { scan-assembler "_ZN1YIiE1fIiEE1XILi1EEv" } }
3
4template <int dim> class X {};
5
6template <class T> struct Y {
7  static const unsigned int dim = 1;
8  template <class U> X<Y<T>::dim> f();
9};
10
11template <class T> template <class U>
12X<Y<T>::dim> Y<T>::f() { return X<dim>(); }
13
14int main()
15{
16  Y<int>().f<int>();
17}
18