weird segfaults @ g++2.8.1, weird mis-linking egcs 1.1

Mumit Khan khan@xraylith.wisc.edu
Wed Oct 7 16:36:00 GMT 1998


Yotam Medini <yotam@avanticorp.com> writes:
> 
> // reported this yesterday for gcc-2.8.1 only.
> 
> Strange, small but non trivial case that demonstrates
> different(?) bugs(?!) in gcc-2.8.1 and egcs-1.1b.
> 
> I believe the program code is fine, and should compile
> link and run smoothly.
> 
> Attached is the log of compile, link and failed run 
> with g++-2.8.1, and compile and failed link with egcs-1.1b.

[ actually, you get a sigsegv not a link error, right? ]

I remember running into something similar in my code which works fine
with two different compilers based on EDG front-end, and couldn't
figure out the problem. The workaround I found for egcs was to define 
a destructor (class D in your case), which should work for your case 
as well. Please try it out.

I never did get a small enough testcase to report, so glad to see a 
compact one like yours.

Regards,
Mumit




More information about the Gcc-bugs mailing list