1 // { dg-do assemble } 2 // PRMS Id: 4357 3 // Bug: g++ forgets to clear out push/popclass cache stuff when instantiating 4 // templates. 5 6 template <class T> class ccHandle { }; 7 8 class cc_GStack 9 { 10 static cc_GStack* freeList; 11 }; 12 13 // OK if ccGStack is not derived from ccHandle<something> 14 class ccGStack : public ccHandle<int> { }; 15 16 struct S { }; 17 18 S* freeList; 19 20 class X 21 { 22 public: 23 void foo(); 24 }; 25 foo()26void X::foo() 27 { 28 S m; 29 freeList = &m; 30 } 31