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
8int here;
9int there;
10
11struct B
12{
13  virtual int activate() {return !here++;}
14};
15
16template <class K>
17struct TPL : public B
18{
19  int activate()
20  {
21    return !there++ && B::activate();
22  }
23};
24
25int main ()
26{
27  TPL<int> i;
28  return !i.activate ();
29}
30