Internal compiler error with member templates.

Matthias Heiler heiler@rumms.uni-mannheim.de
Sun Feb 22 06:12:00 GMT 1998


Hello,

I'm currently playing around with function, functors and member
templates. egcs 1.0.1 doesn't seem to be very happy with the following
code:

===
#include <iostream.h>

template <class A>
class C {
public:
  C() { }

  template <class B>
  void member_template(B g) {  g(priv); }

private:
  A priv;
};

template <class T> 
void apply_this_function(T argument)
{
  cout << "apply_this_function " << argument << endl;
}

int main()
{
  C<int> test;

  test.member_template(apply_this_function);

  return 0;
}
===

===
heiler@athena:/home/heiler/3dgraph > g++ egcs_BUG.cc
egcs_BUG.cc: In function `int main()':
egcs_BUG.cc:31: Internal compiler error.
egcs_BUG.cc:31: Please submit a full bug report to `egcs-bugs@cygnus.com'.
heiler@athena:/home/heiler/3dgraph > 
heiler@athena:/home/heiler/3dgraph > 
heiler@athena:/home/heiler/3dgraph > g++ -v
Reading specs from /usr/local/egcs/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.23/specs
gcc version egcs-2.90.23 980102 (egcs-1.0.1 release)
===

Sorry, if this bug has already been reported.

Bye,

 Matthias






More information about the Gcc-bugs mailing list