This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Internal compiler error with egcs-1.0.3


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]