1 // { dg-do compile }
2 
3 // Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
4 
5 // PR c++/9602: Inline friend/pure virtual tree data sharing in
6 // class template.
7 
8 template <typename T> struct X {
9   void foo (X);
barX10   friend void bar () {}
11 };
12 
13 template <typename T>
foo(X x)14 void X<T>::foo (X x) {}
15 
16 template struct X<int>;
17