🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

BUG in G++ 1.35.0- - abort (a031)

#1959
From: Ron Guilmette
Date: Tue, 09 May 1989 22:03
45 lines
2217 bytes
The following program causes G++ 1.35.0- to abort.  This is test a031.

----------------------------------------------------------------------
// Check that it is possible to use the address of member function
// in an initialization for a statically allocated data object.

class base {
	int data_member;
public:
	base () {}
	base (int i, int j) {}
	int member_function_1 () { return 0; }
	int member_function_1 (int i, int j) { return 0; }
	virtual int member_function_2 () { return 0; }
	virtual int member_function_2 (int i, int j) { return 0; }
	virtual ~base () {}
};

typedef base* (base::*base_mfp_basep_void) ();
typedef base* (base::*base_mfp_basep_int_int) (int, int);
typedef int (base::*base_mfp_int_void) ();
typedef int (base::*base_mfp_int_int_int) (int, int);
typedef void (base::*base_mfp_void_void) ();

base_mfp_basep_void	p0 = base::base;
base_mfp_basep_int_int	p1 = base::base;
base_mfp_int_void	p2 = base::member_function_1;
base_mfp_int_int_int	p3 = base::member_function_1;
base_mfp_int_void	p4 = base::member_function_2;
base_mfp_int_int_int	p5 = base::member_function_2;
base_mfp_void_void	p6 = base::~base;

main ()
{
	return 0;
}
------------------------------------------------------------------------
g++-new-new -g -Wall -Wwrite-strings -v -S a031.C
g++ version 1.35.0-.0
 /usr/local/src/lib/sun3/g++-1.35.0-.0/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -Wall -D__HAVE_68881__ -Dmc68020 a031.C /tmp/cca15478.cpp
GNU CPP version 1.35.0-.0
 /usr/local/src/lib/sun3/g++-1.35.0-.0/gcc-cc1plus /tmp/cca15478.cpp -quiet -dumpbase a031.C -Wall -Wwrite-strings -noreg -version -G -o a031.s
GNU C++ version 1.35.0-.0 (68k, MIT syntax) compiled by GNU C version 1.35.
g++-new-new: Program cc1plus got fatal signal 6.
Technical Details
Message-ID: <8905092203.AA15488@riunite.aca.mcc.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!MCC.COM!rfg

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!MCC.COM!rfg
From: rfg@MCC.COM (Ron Guilmette)
Newsgroups: gnu.g++.bug
Subject: BUG in G++ 1.35.0- - abort (a031)
Message-ID: <8905092203.AA15488@riunite.aca.mcc.com>
Date: 9 May 89 22:03:18 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 45