Segmentation fault building libg++ without named returns

John David Anglin dave@hiauly1.hia.nrc.ca
Mon Sep 11 13:35:00 GMT 2000


> > > Regarding the missing   weak symbols,  I'm pretty   much  at a   loss;
> > > building Fix.cc and  Rational.cc  doesn't generate all  required  weak
> > > symbols as  it  did  before; even worse,   using  a reduced test  case
> > > doesn't fail to  generate those symbols...  I'll dig  further and keep
> > > you informed.
> > 
> > I don't have any time this weekend to work on it but I think a first
> > step would be to dump the assembly code for Fix.cc and see what is
> > happening with respect to the week definitions.
> 
> I did already, they aren't even emitted...

Using your patch, I rebuilt Fix.o and Rational.o without optimisation.  With
no optimisation for these two modules, the weak symbols are there and the
testsuite has no failures.

Comparing the rtl, the rtl generated without optimisation has lots of calls
to Fix::~Fix(void) and the following code is in the assembler output:

        .weak   _._3Fix
	.type    _._3Fix,@function
_._3Fix:

The rtl at -O3 has no calls to Fix::~Fix(void), even in Fix.cc.00.rtl.
There is also no definition for Fix::~Fix(void) in the assemble output.

Things work ok under hpux 10.20.  Thus, the problem is in some way related
to the i386 linux configuration.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


More information about the Gcc-bugs mailing list