Internal compiler error
Rich Lee
llee1@lsc.nd.edu
Thu Sep 10 14:35:00 GMT 1998
Sparc, Solaris 2.6, egcs1.1b
I got Internal compiler error for this little program.
#include <math.h>
#include <vector>
#include <iostream.h>
using std::vector;
template <class X, template<class U> class Container>
X two_norm(const Container<X>& x)
{
X data = 0;
for (typename Container<X>::const_iterator i=x.begin(); i!=x.end(); ++i)
data += *x * *x;
return sqrt(data);
}
int main()
{
vector<double> v(100, 1.0);
cout << two_norm(v) << endl;
return 0;
}
--Rich
More information about the Gcc-bugs
mailing list