This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/42333] complex division failure on darwin10 with -lm
- From: "ghazi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 6 Feb 2011 16:44:06 +0000
- Subject: [Bug other/42333] complex division failure on darwin10 with -lm
- Auto-submitted: auto-generated
- References: <bug-42333-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42333
--- Comment #54 from Kaveh Ghazi <ghazi at gcc dot gnu.org> 2011-02-06 16:43:38 UTC ---
(In reply to comment #53)
> I think we should fix this by patching in a new linkage name for the routine in
> question with darwin_patch_builtins and creating a forwarding stub from the old
> name to the new name that we link against. We could mix in _ieee into the new
> name. If we compile with -fast-math we can call the old routine, no patch, and
> if one wants accuracy, the we call the new name.
I believe GCC already does the "fast" method in some situations. See
tree-complex.c:expand_complex_division(). It switches on flag_complex_method,
the difference is that the operation is done inline rather than a libcall. I'm
foget under what circumstances flag_complex_method triggers, but GCC may
already do what you propose in some fashion.
--Kaveh