This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
function pointer template parameter bug
- To: egcs-bugs at cygnus dot com
- Subject: function pointer template parameter bug
- From: "Adam P. Jenkins" <ajenkins at cs dot umass dot edu>
- Date: Thu, 12 Feb 1998 13:42:26 -0500
The following program crashes egcs-2.90.23 980102.
kalgoorlie:1066$ /exp/rcf/share/bin/g++ -v
Reading specs from /exp/rcf/share/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.90.23/specs
gcc version egcs-2.90.23 980102 (egcs-1.0.1 release)
kalgoorlie:1067$ /exp/rcf/share/bin/g++ tmp.cc
tmp.cc: In function `int main()':
tmp.cc:14: Internal compiler error.
tmp.cc:14: Please submit a full bug report to `egcs-bugs@cygnus.com'.
---------- tmp.cc ----------
double f(double a)
{
return a;
}
template <double (*F)(double)>
double callF(double a)
{
return F(a);
}
int main()
{
callF<f>(2.0); // line 14
return 0;
}
---------------------------
Adam