Thread View: gnu.g++.bug
1 messages
1 total messages
Started by "Douglas C. Schmidt"
Tue, 20 Sep 1988 04:25
Multiple inheritance test case causes failed assertion.
Author: "Douglas C. Schmidt"
Date: Tue, 20 Sep 1988 04:25
Date: Tue, 20 Sep 1988 04:25
58 lines
1872 bytes
1872 bytes
Hi,
As I recall from Doug Lea's 1.27 announcement, multiple inheritance has
not yet be fully implemented in G++. Therefore, the following report may
be superfluous:
----------------------------------------
#include <stream.h>
class Foo {
int j;
public:
Foo(int i = 8) {
j = i;
}
int Return_J() {
return(j);
}
};
class Bar {
int k;
public:
Bar(int i = 9) {
k = i;
}
int Return_K() {
return(k);
}
};
class Foo_Bar : public Bar, public Foo {
public:
Foo_Bar(): Foo(), Bar() {
cout << "hello\n";
}
};
main() {
Foo_Bar Zippy;
cout << "Zippy.Return_K() = " << Zippy.Return_K() << "\n";
cout << "Zippy.Return_J() = " << Zippy.Return_J() << "\n";
}
----------------------------------------
Diagnostics:
----------------------------------------
g++ version 1.27.0
/usr/public/lib/g++/gcc-cpp+ -v -I/cl/ua/schmidt/include/ -undef -D__GNU__ -D__GNUG__ -Dsparc -Dsun -Dunix bug.cc /tmp/cca01029.cpp
GNU CPP version 1.27.0
/usr/public/lib/g++/gcc-c++ /tmp/cca01029.cpp -quiet -dumpbase bug.cc -fmemoize-lookups -fsave-memoized -fchar-charconst -noreg -version -o /tmp/cca01029.s
Failed assertion (((basetype)->classtype.n_parents)) at line 2508 of `class.c'.
GNU C++ version 1.27.0 (sparc) compiled by GNU C version 1.28.
/usr/public/g++: Program c++ 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