[gnu.g++.bug] BUG in G++ 1.35.0- - abort

rfg@MCC.COM (Ron Guilmette) (05/10/89)

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.