1 // PR c++/17324
2 // { dg-do assemble }
3 
4 template<int, typename T> struct A
5 {
fooA6   template<int I> void foo(const A<I,T>&) {}
7 };
8 
9 template<typename> struct B
10 {
11   template<int J> void bar(const A<J,B>&);
bazB12   void baz() { A<0,B>().foo(A<0,B>()); }
13 };
14 
15 template struct B<void>;
16 template struct B<int>;
17