From mboxrd@z Thu Jan 1 00:00:00 1970 From: "John David Anglin" To: manfred.h@gmx.net Cc: gcc-patches@gcc.gnu.org Subject: Re: libg++-2.8.1.3-20000914.diff.gz (was: Re: Segmentation fault building libg++ without named returns) Date: Thu, 21 Sep 2000 09:50:00 -0000 Message-id: <200009211647.MAA28371@hiauly1.hia.nrc.ca> References: <14784.51314.189833.183239@saturn.hollstein.net> X-SW-Source: 2000-09/msg00919.html > On Monday, 11 September 2000, 17:25:11 -0400, dave@hiauly1.hia.nrc.ca wrote: > > > > 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. > > > > If I specify `-fno-inline', the weak defines are output at -O3 in the > > implementation object module. It seems a runtime callable version of > > an inline function is not being output when the function isn't static. > > For modules which include Fix.h but don't have `#pragma implementation', > > it appears the functions defined in the interface are not being inlined > > and a runtime callable version must exist. > > Your analysis is correct and is similar to my observations. Since I > don't have enough time to fix this properly, I came up with the hack > to use -O0 on ia32-linux. I've attached the patch which supersedes the > former version -20000907; "make bootstrap check" ran successfully using > this patch. I have found that the problem is in some way related to math inlines. If the build is done with __NO_MATH_INLINES defined, then Fix.o contains all the required weak defines. There are no testsuite failures with your version -20000907 if I add -D__NO_MATH_INLINES to CXXFLAGS in the Makefile's. The math inlines are output at optimisations above O0. If the preprocessing is done at -O0 and the compilation at -O3, the weak defines are there. The other way around doesn't work. I have been poking around in cc1plus trying to find why the weak defines aren't getting output when the math inlines are present. If somebody more familiar with code can suggest some places to look, it would be helpful. Dave -- J. David Anglin dave.anglin@nrc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6605)