[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 xa002.

------------------------------------------------------------------------
// Check that it is possible to use the address of member function
// in an initialization for a statically allocated data object.
//
// Specifically check that the type of the pointer(s) may be recast
// to (void*) in order to make them compatible with the type of the
// statically allocated object(s).

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) ();

static void* pointers[] = {
	(base_mfp_basep_void)	base::base,
	(base_mfp_basep_int_int)base::base;
	(base_mfp_int_void)	base::member_function_1;
	(base_mfp_int_int_int)	base::member_function_1;
	(base_mfp_int_void)	base::member_function_2;
	(base_mfp_int_int_int)	base::member_function_2;
	(base_mfp_void_void)	base::~base;
};

main ()
{
	return 0;
}
------------------------------------------------------------------------
g++-new-new -v -S xa002.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__ -D__HAVE_68881__ -Dmc68020 xa002.C /tmp/cca15522.cpp
GNU CPP version 1.35.0-.0
 /usr/local/src/lib/sun3/g++-1.35.0-.0/gcc-cc1plus /tmp/cca15522.cpp -quiet -dumpbase xa002.C -noreg -version -o xa002.s
GNU C++ version 1.35.0-.0 (68k, MIT syntax) compiled by GNU C version 1.35.
Failed assertion form != OFFSET_TYPE at line 132 of `cplus-cvt.c'.
g++-new-new: Program cc1plus got fatal signal 6.