aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/lookup.C
blob: c6c44c373d9f7523486163412c1d4537767a5ca8 (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
// PRMS Id: 4357
// Bug: g++ forgets to clear out push/popclass cache stuff when instantiating
// templates.
// Build don't link:

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;
}