This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Internal compiler error using g++-2.91.33
- To: egcs-bugs at cygnus dot com
- Subject: Internal compiler error using g++-2.91.33
- From: Bernd Nottelmann <nottelm at ptp283 dot uni-muenster dot de>
- Date: Fri, 29 May 1998 12:22:05 +0200
- Organization: Westfälische Universität Münster
Hi,
I have reported this bug two weeks ago, but noone
answered. So I decided to send you the bug report
again ...
Here is a testcase:
/*---------------------------snip---------------------------*/
template < class T > class A
{
public:
typedef typename T::myT anotherT;
anotherT t;
A(anotherT _t) {
t=_t;
}
anotherT getT() {
return t;
}
};
class B : public A< B >
{
public:
typedef int myT;
};
int main() {
B b;
}
/*---------------------------snip---------------------------*/
class B inherits template class A and delivers itself
as template parameter to its parent class. Within B the
type int is redefined as myT and should either
be recognized by A or the compiler should produce
an error message, that class type A is incomplete.
Instead of this g++ produces the following output:
> g++ tttst.C
tttst.C: In instantiation of `A<B>':
tttst.C:19: instantiated from here
tttst.C:19: Internal compiler error.
tttst.C:19: Please submit a full bug report to `egcs-bugs@cygnus.com'.
Compiler version:
> g++ -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.33/specs
gcc version egcs-2.91.33 19980525 (gcc2 ss-980502 experimental)
Bernd