ICE 40, using function templates, egcs-2.92.04 19980906
Peter Nordlund
petern@nada.kth.se
Fri Sep 11 01:43:00 GMT 1998
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: err4.ii.gz
Type: application/x-gzip
Size: 5606 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/19980911/5e20b8aa/attachment.bin>
More information about the Gcc-bugs
mailing list