------- Comment #13 from ghazi at gcc dot gnu dot org 2009-12-08 23:58 ------- (In reply to comment #12) > .. seems likely that there are two things here: 1. we seem to be generating > (probably) less efficient code than older versions of the compiler ... and 2. > possibly the ___divdc3 in /usr/lib/libSystem is faulty?
There are more than one way of generating a complex divide. One way is faster, but it's naive (lazy) and leads to errors and overflow. A second way is correct in more cases, but a little slower. FSF GCC defaults to choosing correctness over speed, unless the user asks for extra speed with a special flag. There are flags in FSF GCC for example that allow one to use the "lazy" complex divide algorithms, but the default is correctness. It appears that the Apple GCC has chosen to have their ___divdc3 routine follow the lazy algoritm in the name of speed. This must have been a concious choice on their part. Therefore filing a bug report against it is likely to get a response of "works as intended." 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. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42333