This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: g++: Internal compiler error in 980214 [simplified example]
- To: egcs-bugs at cygnus dot com
- Subject: Re: g++: Internal compiler error in 980214 [simplified example]
- From: Bernd Nottelmann <nottelm at ptp283 dot uni-muenster dot de>
- Date: Mon, 16 Feb 1998 13:25:48 +0100
- Organization: Westfälische Universität Münster
- References: <34E717F3.9C35B749@pt2037.uni-muenster.de>
Bernd Nottelmann wrote:
Here is a strongly simplified version of the program:
--------------------------------snip--------------------------------
template < class T, template <class> class E1, template <class> class E2 >
struct Add {
Add(const E1<T>& e1, const E2<T>& e2) {}
};
template < class T, template <class> class E1, template <class> class E2 >
struct Mul {
Mul(const E1<T>& e1, const E2<T>& e2) {}
};
template < class T >
struct Lit {
Lit(const T& t) {}
};
template < class T >
struct Id {
Add < T, Id, Lit > operator+(const T& t) const {
return Add < T, Id, Lit >(this, Lit<T>(t));
}
Mul < T, Id, Lit > operator*(const T& t) const {
return Mul < T, Id, Lit >(this, Lit<T>(t));
}
};
--------------------------------snip--------------------------------
#g++ -c bug.C
bug.C:25: Internal compiler error 61.
bug.C:25: Please submit a full bug report to `egcs-bugs@cygnus.com'.
> My configuration is
>
> linux-2.0.33
> binutils-2.8.1.0.21
> libc.so.5.4.33
> libstdc++.so.27.2.8
>
> # gcc -v
> Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.08/specs
> gcc version egcs-2.91.08 980214 (gcc-2.8.0 release)
>
> When I took the entire Id-struct away or its operator+(...)-/operator*(...)-method,
> the error has vanished.
>
> Bernd