/* Point of this test is to generate some very long 'stabs' debug strings, via the use of these exponentially large template types. When compiled with -gstabs, this causes 3.1.1 to segfault at startup. */ #include template class Stack { public: Stack(int = 10) { size=5; top=6; stackPtr=(T*)6; }; ~Stack() { } int push(const T&, const U&); int popT(T&); int popU(U&); int isEmpty() const { return top == -1; } int isFull() const { return top == size - 1; } private: int size; int top; T* stackPtr; } ; typedef Stack Foo; typedef Stack Foo2; typedef Stack Foo3; typedef Stack Foo4; typedef Stack Foo5; typedef Stack Foo6; typedef Stack Foo7; typedef Stack Foo8; typedef Stack Foo9; typedef Stack Foo10; typedef Stack Foo11; typedef Stack Foo12; int main ( int argc, char** argv ) { Stack * x = new Stack(3); if (x == NULL) printf("It's NULL (?!)\n"); else printf("It's not NULL. How DULL.\n"); delete x; return 0; }