This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Internal compiler error with egcs-1.0.3
- To: egcs-bugs at cygnus dot com
- Subject: Internal compiler error with egcs-1.0.3
- From: bitti at dcs dot kcl dot ac dot uk (Matti Rintala)
- Date: Tue, 7 Jul 1998 13:18:57 +0100 (BST)
- Cc: bitti at helium dot dcs dot kcl dot ac dot uk (Matti Rintala)
Hi!
The following code produces an internal compiler error with egcs-1.0.3
release (I haven't tried it with anything newer). It seems that egcs
has problems with template classes derived from classes with virtual
base classes. I'm running Redhat 5.1 Linux (although I guess this bug
is probably not platform dependent).
------------- foobar.cc ----------------
class B
{
public:
B(int) {}
};
class C1 : public virtual B
{
public:
C1(float) : B(1) {}
};
template<typename T>
class C2 : public T
{
public:
C2() : B(2), T(3.2) {}
};
void foo()
{
C2<C1> c;
}
------------- foobar.cc ----------------
[pc187 fprox]$ eg++ -W -Wall -pedantic -c foobar.cc
foobar.cc:22: Internal compiler error.
foobar.cc:22: Please submit a full bug report to `egcs-bugs@cygnus.com'.
[pc187 fprox]$ eg++ -v
Reading specs from /usr/local/egcs/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.90.29/specs
gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)
Matti Rintala
bitti@cs.tut.fi