Thread View: gnu.g++.bug
1 messages
1 total messages
Started by Ron Guilmette
Tue, 11 Apr 1989 20:47
segfault in g++ 1.34.1
Author: Ron Guilmette
Date: Tue, 11 Apr 1989 20:47
Date: Tue, 11 Apr 1989 20:47
41 lines
1525 bytes
1525 bytes
The following piece of code, if compiled with g++ 1.34.1 using the
-fall-virtual option, will cause the compiler to segfault.
The problem seems to have been that cplus-typeck.c contained an
incorrect test for "constructorness". A trivial patch is provided
below. This patch may fix some other related bugs as well.
// Options: -fall-virtual
class base {
public:
void operator -> () (int, int, ...);
};
class derived : public base {
public:
derived ();
};
void* p;
int test ()
{
p = (void*) &derived::derived; // SEGFAULT
}
*** ../cplus-typeck.c Wed Mar 15 11:26:44 1989
--- cplus-typeck.c Mon Mar 27 18:30:50 1989
***************
*** 3471,3475 ****
&& (TREE_HAS_METHOD_CALL_OVERLOADED (DECL_CONTEXT (t))
|| TREE_NEEDS_WRAPPER (DECL_CONTEXT (t)))
! && ! TREE_IS_CONSTRUCTOR (TREE_TYPE (t))))
{
offset = copy_node (DECL_VINDEX (t));
--- 3471,3475 ----
&& (TREE_HAS_METHOD_CALL_OVERLOADED (DECL_CONTEXT (t))
|| TREE_NEEDS_WRAPPER (DECL_CONTEXT (t)))
! && ! TREE_IS_CONSTRUCTOR (t)))
{
offset = copy_node (DECL_VINDEX (t));
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