Internal compiler error
David Mazieres
dm@reeducation-labor.lcs.mit.edu
Mon Aug 3 03:39:00 GMT 1998
In slightly old versions of egcs 1.1 (sorry, the very tip of the 1.1
branch doesn't compile for me today):
Reading specs from /usr/local/egcs/lib/gcc-lib/i386-netbsd/egcs-2.91.50/specs
gcc version egcs-2.91.50 19980714 (gcc2 ss-980609 experimental)
Reading specs from /usr/local/egcs/lib/gcc-lib/i386-netbsd/egcs-2.91.47/specs
gcc version egcs-2.91.47 19980708 (gcc2 ss-980609 experimental)
I get an internal compiler error when compiling the attached program.
% c++ -O ttinterr.C
ttinterr.C: In method `int foo<long int>::pub<int>(int)':
ttinterr.C:20: instantiated from here
ttinterr.C:11: Internal compiler error.
ttinterr.C:11: Please submit a full bug report to `egcs-bugs@cygnus.com'.
%
Thanks,
David
--
template<class T>
class foo {
T deft;
template<class U> int priv (U u, T t) { return u - t; }
public:
foo (T t) : deft (t) {}
template<class U> int pub (U u) {
int (foo::*fn) (U, T);
fn = &foo<T>::priv<U>;
return (this->*fn) (u, deft);
}
};
int
main ()
{
foo<long> fff (5);
return fff.pub (3);
}
More information about the Gcc-bugs
mailing list