Bug report: internal compiler error on a throw statement

Thomas Kunert kunert@physik.tu-dresden.de
Fri Aug 14 08:02:00 GMT 1998


C. van Reeuwijk wrote:
> 
> Hello everyone,
> 
> I have found an internal compiler error.
> 
> The following program:
> =-=-=-=-=-=-=-=
> class Exception {
> public:
>     Exception() {}
> };
> 
> class Exception2: public Exception {
> public:
>     Exception2() {}
>     virtual ~Exception2() {}
> };
> 
> template<class T> class X {
> public:
>     X() { }
>     void Bad() { throw Exception2(); }
> };
> 
> int main()
> {
>     X<int> A;
>     A.Bad();
>     return 0;
> }
> =-=-=-=-=-=-=-=
> 
> Causes the following internal compiler error:
> 
> > g++ -Wall t.cc
> t.cc: In method `Exception2::Exception2(const class Exception2 &)':
> t.cc:15: Internal compiler error 980521.
> t.cc:15: Please submit a full bug report to `egcs-bugs@cygnus.com'.
> Exit 1
> 
> I use the following compiler version:
> 
> > g++ -v
> Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.50/specs
> gcc version egcs-2.91.50 19980714 (gcc2 ss-980609 experimental)

I cannot reproduce it here on i586-pc-linux-gnu, neither with the
current snapshot nor with egcs-1.0.2. 
Probably it has been fixed in the meantime.

--
Thomas Kunert



More information about the Gcc-bugs mailing list