[Bug other/42333] complex division failure on darwin10 with -lm

developer at sandoe-acoustics dot co dot uk gcc-bugzilla@gcc.gnu.org
Wed Dec 9 11:38:00 GMT 2009



------- Comment #20 from developer at sandoe-acoustics dot co dot uk  2009-12-09 11:37 -------
(In reply to comment #17)
> (In reply to comment #15)
> > (In reply to comment #13)
> > > You can try filing a bug report at Apple, but I think a better route would be
> > > to see if we can avoid linking in the system ___divdc3  from FSF GCC.

Summary (for Dominique's test case):

working [regardless of placement of -lm]:
Darwin 9 [ppc/i686]
Apple 4.0,4.2 
FSF 4.5 

Darwin 10
Apple 4.0, 4.2
FSF 4.5 without -lm

FSF 4.5 fails with the placement of -lm  (which causes linkage of
/usr/lib/libSystem version of  ___divdc3)

the latter can be emulated using Apple's 4.2 by compiling the asm output from
FSF 4.5 for Dominique's test case.

So; Apple's two compilers that produce in-line code for ___divdc3 are
apparently 'doing the right thing' (in spite of your concern about potential
optimization issues).  We might look at porting the relevant .md sections to
FSF ... 

The regression is in the library version of ___divdc3 supplied in Darwin10
(i.e. nothing to do with FSF gcc);  This could be radared (although as you say
there is not much motivation to fix something that is unused). 

I repeat my earlier question:  
Why is -lm being used for this test case?  
Darwin, AFAIR, does not use -lm . { see comment in gcc/config/darwin.h #define
MATH_LIBRARY "" }

(of course, one could argue that it should be harmless, in an ideal world)



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42333



More information about the Gcc-bugs mailing list