1 // { dg-do run } 2 3 // Copyright (C) 2003 Free Software Foundation, Inc. 4 // Contributed by Nathan Sidwell 23 Jan 2003 <nathan@codesourcery.com> 5 6 // PR9415. Forgot a lookup was scoped 7 8 int here; 9 int there; 10 11 struct B 12 { activateB13 virtual int activate() {return !here++;} 14 }; 15 16 template <class K> 17 struct TPL : public B 18 { activateTPL19 int activate() 20 { 21 return !there++ && B::activate(); 22 } 23 }; 24 main()25int main () 26 { 27 TPL<int> i; 28 return !i.activate (); 29 } 30