// { dg-do compile }// Origin: Giovanni Bajo <giovannibajo@libero.it>// PR c++/4403: Incorrect friend class chosen during instantiation.template<typename T>struct A
{struct F;};template<typename T>struct B : A<T>{friendstruct F;private:int priv;};struct F
{voidfunc(void){
B<int> b;
b.priv =0;}};