From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Samoilov To: egcs-bugs@cygnus.com Cc: egcs@cygnus.com Subject: Internal Compiler Error report Date: Thu, 30 Apr 1998 18:55:00 -0000 Message-id: X-SW-Source: 1998-04/msg01195.html Hi all, The following code fragment --------------------------------- template class List; template class ListIterator { public: ListIterator (const List& aList); // This declaration causes internal compiler error ListIterator (const ListIterator& rhs); operator void* () const; ListIterator& operator++ (); }; template class List { public: int length () const { int len = 0; for (ListIterator li(*this); li; ++li) len++; return len; } }; void test(List& vals) { int val = vals.length(); } -------------------------------------------------------------------- causes ICE: -------------------------------------------------------------------- t12.cc: In method `int List::length() const': t12.cc:27: Internal compiler error. t12.cc:27: Please submit a full bug report to `egcs-bugs@cygnus.com'. for all snapshots later than 1998-03-02 including the latest CVS snapshot. This has been tested on Linux gnulibc1 and Sparc Solaris 2.5.1. Please note, that after commenting copy constructor declaration this example can be compiled by egcs. gcc-2.8.1 compiles this sample ok. Hope this help. Regards, Alexander Samoilov