This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
1.1.2pre3 pseudo destructor internal compiler error
- To: egcs-bugs at cygnus dot com
- Subject: 1.1.2pre3 pseudo destructor internal compiler error
- From: David Mazieres <dm at reeducation-labor dot lcs dot mit dot edu>
- Date: Wed, 10 Mar 1999 21:00:38 -0500 (EST)
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;
}