summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/lookup.C
blob: fe800835f64ed190386805e594ed89df6efbdd91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// { dg-do assemble  }
// PRMS Id: 4357
// Bug: g++ forgets to clear out push/popclass cache stuff when instantiating
// templates.

template <class T> class ccHandle { };

class cc_GStack
{
  static cc_GStack* freeList;
};

// OK if ccGStack is not derived from ccHandle<something>
class ccGStack : public ccHandle<int> { };

struct S { };

S* freeList;	  

class X
{
public:
    void foo();
};

void X::foo()
{
  S m;
  freeList = &m;
}