1.1.2pre3 pseudo destructor internal compiler error

David Mazieres dm@reeducation-labor.lcs.mit.edu
Wed Mar 10 18:00:00 GMT 1999


I am using egcs 1.1.2pre3 on Digital unix V4.0:

% g++ -v
Reading specs from /u/dm/OSF1/lib/gcc-lib/alphaev56-dec-osf4.0c/egcs-2.91.63/specs
gcc version egcs-2.91.63 19990224 (egcs-1.1.2 pre-release-3)

Egcs dies with the following error:

% g++ desret.C
desret.C: In function `void * destroy_return<void *>(void *&)':
desret.C:14:   instantiated from here
desret.C:6: Internal compiler error.
desret.C:6: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
desret.C:6: See <URL: http://egcs.cygnus.com/faq.html#bugreport > for details.

Thanks,
David


==

template<class T> inline T
destroy_return (T &t)
{
  T ret = t;
  t.~T ();
  return ret;
}

int
main ()
{
  void *p = 0;
  void *q = destroy_return (p);
  return !q;
}


More information about the Gcc-bugs mailing list