This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

ICE 40, using function templates, egcs-2.92.04 19980906


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]