Thread View: gnu.g++.bug
1 messages
1 total messages
Started by Ron Guilmette
Tue, 09 May 1989 22:05
BUG in G++ 1.35.0- abort (xa002)
Author: Ron Guilmette
Date: Tue, 09 May 1989 22:05
Date: Tue, 09 May 1989 22:05
52 lines
2432 bytes
2432 bytes
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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads