🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Wrong name on constructor causes SEGV

#2158
From: ojr
Date: Thu, 11 Jan 1990 15:43
39 lines
1814 bytes
The following program causes a segment viaolation when compiled. I
think it is about as small as it can be.
Configuration: sun3-os4 and sun4-os4, g++ 1.36.1
------------------------------
class C {
public:
    C(int j);
    virtual ~C();
};

class B : public C {
public:
    ~A() {}
    A();
};

B A(3.0);
--------------------------------
g++ -c -v d2.cc
gcc version 1.36.1 (based on GCC 1.36)
 /usr/local/lib/gcc-cpp -+ -v -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 d2.cc /usr/tmp/cca16716.cpp
GNU CPP version 1.36
 /usr/local/lib/gcc-cc1plus /usr/tmp/cca16716.cpp -quiet -dumpbase d2.cc -version -o /usr/tmp/cca16716.s
GNU C++ version 1.36.1 (based on GCC 1.36) (68k, MIT syntax) compiled by GNU C version 1.36.
default target switches: -m68020 -mc68020 -m68881 -mbitfield
d2.cc:9: destructor `A' must match class name
d2.cc: In function void _GLOBAL_$D$d2_cc ():
d2.cc:13: Segmentation violation
g++: Program cc1plus got fatal signal 11.
----------------------------------------
Thank you for an otherwise very good compiler ....

Ornulf Jan Rodseth M.Sc.			Telephone
SINTEF Dep. of Automatic Control		(+47 7) 594351 Direct
N-7034 TRONDHEIM				(+47 7) 594375 Switchboard
NORWAY						(+47 7) 594399 Fax

ojr%regtek.unit.uninett@tor.nta.no (EAN)	ojr@itk.unit.no (ARPA)
Technical Details
Message-ID: <9001111545.AA16722@inge.itk.unit.no>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!lll-winken!uwm.edu!cs.utexas.edu!tut.cis.ohio-state.edu!itk.unit.no!ojr

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!lll-winken!uwm.edu!cs.utexas.edu!tut.cis.ohio-state.edu!itk.unit.no!ojr
From: ojr@itk.unit.no
Newsgroups: gnu.g++.bug
Subject: Wrong name on constructor causes SEGV
Message-ID: <9001111545.AA16722@inge.itk.unit.no>
Date: 11 Jan 90 15:43:54 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 39