1 // { dg-do compile }
2 // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
3 // DR213: Lookup in dependent base classes
4 
5 // We should emit an error at *instantiation* time because g(t) can't be
6 //  resolved to any function.
7 
8 template <class T> struct A : T {
hA9   void h(T t) {
10     f(t);
11     g(t);     // { dg-message "" }
12   }
13 };
14 
15 struct B {
16   void f(B);
gB17   void g(B) {}
18 };
19 
f(B)20 void f(B) {}
21 
main()22 int main()
23 {
24   A<B> ab;
25   B b;
26   ab.h(b);   // { dg-message "required" }
27 }
28