🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #519

g++ 1.35.0, sun3-os4; seg fault while compiling broken program

#519
From: David Hinman
Date: Thu, 19 Oct 1989 21:24
45 lines
1803 bytes
When I compile the following program, which erroneously declares a static
member that is an array of objects that need constructors, the compiler gets
a segmentation fault.

>>> The code:

class Blimpht
{
public:
	virtual void trick1();
	};

class Test
{
public:
	static Blimpht fred[17]; // this is an error, since
				 // fred has a constructor because
				 // of virtual function trick1()
	};

>>> The compilation:

CSH curly hinman> g++ -v -c junk.C
g++ version 1.35.0
 /usr/public/lib/gnucompilers/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ 
-D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ 
-D__HAVE_68881__ -Dmc68020 junk.C /tmp/cca13974.cpp
GNU CPP version 1.35
 /usr/public/lib/gnucompilers/gcc-cc1plus /tmp/cca13974.cpp -quiet -dumpbase 
junk.C -noreg -version -o /tmp/cca13974.s
GNU C++ version 1.35.0 (68k, MIT syntax) compiled by GNU C version 1.35.
junk.C:13: Segmentation violation
g++: Program cc1plus got fatal signal 11.
CSH curly hinman> 

>>> Words of appreciation:

We're very happy with the quality of g++ here; thanks for making it
available to us!

Dave Hinman                         
Samsung Software America           (508) 685-7200 ext. 124
One Corporate Drive                hinman@ginosko.samsung.com
Andover, MA 01810                  uunet!ginosko!hinman
Technical Details
Message-ID: <8910192124.AA28143@imposter>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!IMPOSTER.SAMSUNG.COM!hinman

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!IMPOSTER.SAMSUNG.COM!hinman
From: hinman@IMPOSTER.SAMSUNG.COM (David Hinman)
Newsgroups: gnu.g++.bug
Subject: g++ 1.35.0, sun3-os4; seg fault while compiling broken program
Message-ID: <8910192124.AA28143@imposter>
Date: 19 Oct 89 21:24:01 GMT
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: <hinman@imposter.samsung.com>
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 45