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]

STL's equal: Internal compiler error.


Hi!

Just found out the STL's equal template triggers an internal error
in egcs dated 980221.  The smallest program I could reproduce it
with is this:

----------------------------------------------------------------------
#include <algorithm>
#include <functional>

template<class T>
class A
{
public:
   T* data;
   bool operator==(const A<T>& rhs) const
   {
      return equal(data, data+10, rhs.data, equal_to);
   }
};

int main()
{
   A<int> a, b;
   return a == b;
}
----------------------------------------------------------------------

The message I get is this:

----------------------------------------------------------------------
/usr/local/include/g++/stl_algobase.h: In function `bool equal<int *,
 int *, equal_to<T>>(int *, int *, int *, struct equal_to<T>)':
/usr/local/include/g++/stl_algobase.h:333: Internal compiler error.
/usr/local/include/g++/stl_algobase.h:333: Please submit a full bug
 report to `egcs-bugs@cygnus.com'.
----------------------------------------------------------------------

(line wrapping by me)

Stefan.


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