This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
STL's equal: Internal compiler error.
- To: egcs-bugs at cygnus dot com
- Subject: STL's equal: Internal compiler error.
- From: Stefan Eggers <seggers at semyam dot dinoco dot de>
- Date: Wed, 25 Mar 1998 20:55:13 +0100
- cc: seggers at semyam dot dinoco dot de
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.