Path: utzoo!telly!ddsw1!lll-winken!killer!osu-cis!tut.cis.ohio-state.edu!ORION.CF.UCI.EDU!schmidt%crimee.ics.uci.edu From: schmidt%crimee.ics.uci.edu@ORION.CF.UCI.EDU ("Douglas C. Schmidt") Newsgroups: gnu.g++.bug Subject: program gives fatal signal on sparc Message-ID: <8810031429.aa06120@PARIS.ICS.UCI.EDU> Date: 3 Oct 88 21:29:07 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 48 Hi, The following program gets a fatal signal running g++ 1.27 on the Sun 4: ---------------------------------------- class Base { private: char *Str; public: Base(void) { Str = "I am the Base"; } void Assign(char *S) { Str = new char[strlen(S) + 1]; strcpy(Str,S); } }; class Derived : Base { public: Derived(char *S): () { Base::Assign(S); } }; main() { Base Vector[100]; for (int i = 0; i < 100; i++) { Vector[i] = odd(i) ? : Derived("I am derived"); } } ---------------------------------------- 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 test.C /tmp/cca18659.cpp GNU CPP version 1.27.0 /usr/public/lib/g++/gcc-c++ /tmp/cca18659.cpp -quiet -dumpbase test.C -fchar-charconst -noreg -version -o /tmp/cca18659.s test.C:28: Segmentation violation /usr/public/g++: Program c++ got fatal signal 11.