https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90925
--- Comment #2 from zhonghao at pku dot org.cn --- A related code sample: class A { virtual int String (); }; class F: public A { }; template < typename V > class G { private: V value; }; class D { template < int N > void Verify() { G<F>* x = 0; F& name = x->value; name.String(); } }; gcc also accepts it, although x->value is private.