// PR c++/94799 - member template function lookup fails. template struct B { void foo (); int i; }; template struct D : public B { }; template void fn (D d) { d.template B::foo (); d.template B::i = 42; D().template B::foo (); d.template D::template B::foo (); d.template D::template B::i = 10; } int main () { D d; fn(d); }