public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/3290: SEGV in the ctor of a complex multiple inherited class
@ 2001-06-20 6:46 Sai-Lai Lo
0 siblings, 0 replies; only message in thread
From: Sai-Lai Lo @ 2001-06-20 6:46 UTC (permalink / raw)
To: gcc-gnats
>Number: 3290
>Category: c++
>Synopsis: SEGV in the ctor of a complex multiple inherited C++ class
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Wed Jun 20 06:46:03 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Sai Lai Lo
>Release: 3.0
>Organization:
AT&T Laboratories- Cambridge
>Environment:
System: Linux neem.uk.research.att.com 2.4.3patched #3 SMP Tue Apr 3 16:32:03 BST 2001 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../configure --prefix=/usr/local/gcc --enable-threads=posix --enable-languages=c++
>Description:
>How-To-Repeat:
The following simple test code can reproduce the problem:
// compile and run, output as follows
// % ./t
// C_5
// B_5
// B_4
// D_4
// A_3
// C_4
// A_4
// B_3
// C_3
// zsh: segmentation fault (core dumped) ./t
#include <iostream.h>
class C_5 {
public:
C_5() {
cerr << "C_5" << endl;
}
};
class B_5 : public virtual C_5 {
public:
B_5() {
cerr << "B_5" << endl;
}
};
class C_4 {
public:
C_4() {
cerr << "C_4" << endl;
}
};
class B_4 : public virtual B_5 {
public:
B_4() {
cerr << "B_4" << endl;
}
};
class A_4 : public virtual C_4,
public virtual B_5 {
public:
A_4() {
cerr << "A_4" << endl;
}
};
class D_4 : public virtual C_5 {
public:
D_4() {
cerr << "D_4" << endl;
}
};
class A_3 : public virtual B_4,
public virtual D_4 {
public:
A_3() {
cerr << "A_3" << endl;
}
};
class B_3 : public virtual A_4,
public virtual B_4 {
public:
B_3() {
cerr << "B_3" << endl;
}
};
class C_3 : public virtual C_4,
public virtual D_4 {
public:
C_3() {
cerr << "C_3" << endl;
}
};
class A_2 : public virtual A_3,
public virtual B_3,
public virtual C_3 {
public:
A_2() {
cerr << "A_2" << endl;
}
};
class A_1 : public virtual A_2 {
public:
A_1() {
cerr << "A_1" << endl;
}
};
int
main(int, char**) {
A_1 a1;
return 0;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-06-20 6:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-20 6:46 c++/3290: SEGV in the ctor of a complex multiple inherited class Sai-Lai Lo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).