// { dg-do run } // PRMS Id: 1502 // Bug: g++ fails to resolve 'gnc' in the call to 'grid'. template class foo { public: foo() { } }; template class bar : public foo { public: bar() : foo() {} }; template class ben : public foo { public: ben() : foo() {} void grid(T (*f)(bar&),bar& x,bar& y,bar& param); }; template void ben::grid(T (*f)(bar&),bar& x,bar& y,bar& param) { } template T gnc(bar& a) { return 0; } int main() { ben a; bar x,y,p; a.grid(gnc,x,y,p); return 0; }