Thread View: gnu.g++.bug
1 messages
1 total messages
Started by "Douglas C. Schmidt"
Sun, 09 Oct 1988 02:42
Fatal signal for sparc
Author: "Douglas C. Schmidt"
Date: Sun, 09 Oct 1988 02:42
Date: Sun, 09 Oct 1988 02:42
60 lines
1836 bytes
1836 bytes
Hi,
G++ 1.27 gets a fatal signal for the following short program. This
occurs on a Sun 4:
----------------------------------------
static const int Max_Buf = 100000;
class Binary_Search_Tree {
private:
struct Tree_Node {
static Tree_Node *Base;
void * operator new ( long ) {
return ( Base++ );
}
void operator delete ( void * Ptr ) {
}
Tree_Node () {}
};
public:
Binary_Search_Tree ( void );
~Binary_Search_Tree ( void );
};
Binary_Search_Tree::Binary_Search_Tree ( void ) {
Tree_Node::Base = new Tree_Node [ Max_Buf ];
}
Binary_Search_Tree::~Binary_Search_Tree ( void ) {
delete (Tree_Node *) Tree_Node::Base;
}
----------------------------------------
Here is the diagnostic:
----------------------------------------
g++ version 1.27.0
echo use .cc filename extension!
use .cc filename extension!
/usr/public/lib/g++/gcc-cpp+ -v -I/cd/ua/schmidt/include/ -undef
-D__GNU__ -D__GNUG__ -Dsparc -Dsun -Dunix -D__OPTIMIZE__ bug.C
/tmp/cca13219.cpp GNU CPP version 1.27.0
/usr/public/lib/g++/gcc-c++ /tmp/cca13219.cpp -quiet -dumpbase bug.C
-fchar-charconst -opt -version -o /tmp/cca13219.s
In function void Binary_Search_Tree::~Binary_Search_Tree ():
bug.C:34: Segmentation violation
/usr/public/g++: Program c++ got fatal signal 11.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads