1 // PR c++/59930
2 
3 namespace N {
4   template < typename T > class A
5   {
6     // Injects N::N
7     template < T > friend class N;
8     // { dg-error "template parameter" "" { target *-*-* } .-1 }
9     // { dg-message "note: redeclared"  "" { target *-*-* } .-2 }
10   };
11 }
12 
f()13 void f ()
14 {
15   N::A < int > a1;
16   N::A <short > a2;
17 }
18