https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94799
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Another test, where the name after . isn't an injected-class-name: template<typename T> struct B { void foo (); int i; }; template<typename T> struct D : public B<T> { }; template<typename T> void fn (D<T> d) { d.template B<T>::foo (); d.template B<T>::i = 42; }