// GROUPS passed code-generation // execution test fails - // code-gen file // From: mscha@anne.wifo.uni-mannheim.de (Martin Schader) // Date: Wed, 4 Aug 93 19:14:52 +0200 // Message-ID: <9308041714.AA00752@anne.wifo.uni-mannheim.de> extern "C" int printf (const char *, ...); template struct Y { Y* next; }; template struct X { X() { ptrY = 0; } void f(); Y* ptrY; }; template void X::f() { ptrY->next = ptrY = new Y; // // Use two assignment statements and it works // ptrY = new Y; // ptrY->next = ptrY; } int main() { X x; x.f(); printf ("PASS\n"); exit(0); }