This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
ICE 40, using function templates, egcs-2.92.04 19980906
- To: egcs-bugs at cygnus dot com
- Subject: ICE 40, using function templates, egcs-2.92.04 19980906
- From: Peter Nordlund <petern at nada dot kth dot se>
- Date: Fri, 11 Sep 1998 10:14:45 +0200
- Organization: KTH, NADA, CVAP
The code below generates an internal compiler error.
I get an internal compiler error with the code below.
.ii file is attatched in the mail.
marr:src>>g++ err4.cc
err4.cc: In function `int main()':
err4.cc:11: Internal compiler error 40.
err4.cc:11: Please submit a full bug report to `egcs-bugs@cygnus.com'.
marr:src>>g++ -v
Reading specs from
/usr/local/cvap/egcs/egcs-19980906/lib/gcc-lib/mips-sgi-irix6.4/egcs-2.92.04/specs
gcc version egcs-2.92.04 19980906 (gcc2 ss-980609 experimental)
---------------
#include <iostream>
double f(double in) { return in; }
class test{
public:
template<double TF(double)> static double fcn(double in) { return
TF(in);}
};
int main() {
cerr << (test::fcn<f>(4));
return 0;
}
---------------
//Peter
err4.ii.gz