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

2011-06-30 Thread mrs at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42333 --- Comment #58 from mrs at gcc dot gnu.org mrs at gcc dot gnu.org 2011-06-30 16:31:29 UTC --- Author: mrs Date: Thu Jun 30 16:31:23 2011 New Revision: 175711 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=175711 Log: 2011-06-30 Jack

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

2011-06-30 Thread mrs at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42333 m...@gcc.gnu.org mrs at gcc dot gnu.org changed: What|Removed |Added Known to work||4.5.4

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

2011-02-07 Thread mrs at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42333 --- Comment #55 from mrs at gcc dot gnu.org mrs at gcc dot gnu.org 2011-02-07 20:52:39 UTC --- Author: mrs Date: Mon Feb 7 20:52:33 2011 New Revision: 169903 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169903 Log: PR target/42333

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

2011-02-07 Thread mrs at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42333 m...@gcc.gnu.org mrs at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED

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

2011-02-07 Thread mrs at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42333 --- Comment #57 from mrs at gcc dot gnu.org mrs at gcc dot gnu.org 2011-02-07 20:56:32 UTC --- I'll pre-approve a backport to 4.5.x if someone really wants it, should be very safe.

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

2011-02-06 Thread ghazi at gcc dot gnu.org
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

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

2011-02-05 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42333 --- Comment #51 from Jack Howarth howarth at nitro dot med.uc.edu 2011-02-05 21:11:30 UTC --- The __divdc3 in Snow Leopard come from the compiler-rt llvm project. Here are the tests they they use to validate their __divdc3...

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

2011-02-05 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42333 --- Comment #52 from Jack Howarth howarth at nitro dot med.uc.edu 2011-02-05 21:49:14 UTC --- Filed bug report upstream against compiler-rt with testcase... http://llvm.org/bugs/show_bug.cgi?id=9150

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

2011-02-05 Thread mrs at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42333 m...@gcc.gnu.org mrs at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last

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

2010-04-14 Thread iains at gcc dot gnu dot org
--- Comment #50 from iains at gcc dot gnu dot org 2010-04-14 17:38 --- see: http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00806.html for a proposed work-around for this. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42333

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

2010-04-13 Thread howarth at nitro dot med dot uc dot edu
--- Comment #44 from howarth at nitro dot med dot uc dot edu 2010-04-13 16:01 --- From a discussion with the clang programmers, I have this response... The FIXME comment in the clang sources caught my eye because, at first glance, it appears to be hinting that this usage of

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

2010-04-13 Thread howarth at nitro dot med dot uc dot edu
--- Comment #45 from howarth at nitro dot med dot uc dot edu 2010-04-13 16:06 --- Did anyone ever file a radar bug report on the inaccurate complex math from http://compiler-rt.llvm.org/? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42333

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

2010-04-13 Thread dominiq at lps dot ens dot fr
--- Comment #46 from dominiq at lps dot ens dot fr 2010-04-13 16:29 --- Did anyone ever file a radar bug report on the inaccurate complex math from http://compiler-rt.llvm.org/? I did not see anything along this line in their bugzilla. However there is comment #25 I've filed

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

2010-04-13 Thread howarth at nitro dot med dot uc dot edu
--- Comment #47 from howarth at nitro dot med dot uc dot edu 2010-04-13 16:48 --- Not good news...according to another Apple programmer... -- Mike Stump filed the radar: rdar://problem/7457013 ___divdc3 slightly wrong Since fixing it did not appear to positively impact our

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

2010-04-13 Thread iains at gcc dot gnu dot org
--- Comment #48 from iains at gcc dot gnu dot org 2010-04-13 16:52 --- give me a day or two guys... and I'll post a composite patch that (a) cleans up some of the nits in config{,/*}/darwin*.h (b) gets rid of -lgcc [well, moves it to the only places it's still needed] (c) sorts out

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

2010-04-13 Thread howarth at nitro dot med dot uc dot edu
--- Comment #49 from howarth at nitro dot med dot uc dot edu 2010-04-13 16:59 --- (In reply to comment #48) (d) temporarily patches darwin10.h to include the static lib first and therefore work around this bug until the radar is done. From what I was told (Comment 47), the radar bug

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

2010-04-12 Thread iains at gcc dot gnu dot org
--- Comment #42 from iains at gcc dot gnu dot org 2010-04-13 01:07 --- actually, The logic in libgcc_s/libgcc_ext is working properly - libgcc_s.10.5 = /usr/libgcc_s.1.dylib = /usr/libSystem.dylib. The function is named in /usr/lib/libgcc_s.10.5. What is happening is Bad [at least

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

2010-04-12 Thread howarth at nitro dot med dot uc dot edu
--- Comment #43 from howarth at nitro dot med dot uc dot edu 2010-04-13 01:54 --- Interestingly, if you examine clang/lib/Driver/Tools.cpp from the upcoming 2.7 release, you find... // FIXME: For some reason GCC passes -lgcc before adding // the default system libraries. Just

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

2010-04-11 Thread iains at gcc dot gnu dot org
--- Comment #36 from iains at gcc dot gnu dot org 2010-04-11 10:18 --- (In reply to comment #33) (In reply to comment #32) Note that when using the patch in comment #22 triggers pr43254: another side effect of -lm is to prevent the run of dsymutil even with -g. my 0,02 euro... 1.

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

2010-04-11 Thread howarth at nitro dot med dot uc dot edu
--- Comment #37 from howarth at nitro dot med dot uc dot edu 2010-04-11 13:56 --- Actually, it has to be... @@ -30,8 +30,8 @@ #set_board_info host_library_path [file dirname [file dirname [file dirname [file dirname [file dirname [exec [find_gcc] --print-prog-name=cc1]]/lib -#

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

2010-04-11 Thread howarth at nitro dot med dot uc dot edu
--- Comment #38 from howarth at nitro dot med dot uc dot edu 2010-04-11 14:47 --- Interestingly, while the change in Comment 37 eliminates the failures in gcc.dg/torture/builtin-math-7.c, it introduces the failures... FAIL: gcc.c-torture/execute/20020412-1.c compilation, -O3 -g

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

2010-04-11 Thread iains at gcc dot gnu dot org
--- Comment #39 from iains at gcc dot gnu dot org 2010-04-11 15:10 --- (In reply to comment #38) Interestingly, while the change in Comment 37 eliminates the failures in gcc.dg/torture/builtin-math-7.c, it introduces the failures... FAIL: gcc.c-torture/execute/20020412-1.c

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

2010-04-11 Thread howarth at nitro dot med dot uc dot edu
--- Comment #40 from howarth at nitro dot med dot uc dot edu 2010-04-11 15:24 --- Has the issue in Comment 33/38 been reported on radar? If so, let me know the radar problem number and I'll ping the dsymutil developer at Apple. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42333

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

2010-04-11 Thread dominiq at lps dot ens dot fr
--- Comment #41 from dominiq at lps dot ens dot fr 2010-04-11 15:36 --- Has the issue in Comment 33/38 been reported on radar? No. If you want to do it, be my guest!-(You got answer to my last one I did not get, not even an acknowledgement). --

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

2010-04-09 Thread iains at gcc dot gnu dot org
--- Comment #32 from iains at gcc dot gnu dot org 2010-04-09 20:45 --- (In reply to comment #21) As a workaround in gcc I suggest to strip -lm in the darwin specific specs processing. I think this is our best way forward. We should not accept -lm if it could alter the behavior of

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

2010-04-09 Thread dominiq at lps dot ens dot fr
--- Comment #33 from dominiq at lps dot ens dot fr 2010-04-09 20:56 --- (In reply to comment #32) Note that when using the patch in comment #22 triggers pr43254: another side effect of -lm is to prevent the run of dsymutil even with -g. --

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

2010-04-09 Thread howarth at nitro dot med dot uc dot edu
--- Comment #34 from howarth at nitro dot med dot uc dot edu 2010-04-09 21:06 --- I thought we were going to wait for the vendor (Apple) to fix their complex math subroutines. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42333

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

2010-04-09 Thread iains at gcc dot gnu dot org
--- Comment #35 from iains at gcc dot gnu dot org 2010-04-09 22:30 --- (In reply to comment #34) I thought we were going to wait for the vendor (Apple) to fix their complex math subroutines. We shouldn't be affected by the bug - so, great if it gets fixed, but we still need to make

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

2009-12-11 Thread ghazi at gcc dot gnu dot org
--- Comment #31 from ghazi at gcc dot gnu dot org 2009-12-11 16:44 --- *** Bug 42074 has been marked as a duplicate of this bug. *** -- ghazi at gcc dot gnu dot org changed: What|Removed |Added

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

2009-12-10 Thread sabre at nondot dot org
--- Comment #30 from sabre at nondot dot org 2009-12-10 23:44 --- FWIW, the darwin10 version of ___divdc3 comes from http://compiler-rt.llvm.org/ sounds like a bug there. -- sabre at nondot dot org changed: What|Removed |Added

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

2009-12-09 Thread dominiq at lps dot ens dot fr
--- Comment #19 from dominiq at lps dot ens dot fr 2009-12-09 09:31 --- As far as generation of a test case is concerned - why not just use the asm generated by 4.5? I did that and the assembly generated on darwin10 works fine on darwin9. I can fill a bug report to Apple to know if

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

2009-12-09 Thread developer at sandoe-acoustics dot co dot uk
--- 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

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

2009-12-09 Thread rguenth at gcc dot gnu dot org
--- Comment #21 from rguenth at gcc dot gnu dot org 2009-12-09 11:42 --- As a workaround in gcc I suggest to strip -lm in the darwin specific specs processing. Otherwise this is not a GCC bug (again), but a darwin bug - why do they always creep into gcc bugzilla ... --

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

2009-12-09 Thread developer at sandoe-acoustics dot co dot uk
--- Comment #22 from developer at sandoe-acoustics dot co dot uk 2009-12-09 15:21 --- (In reply to comment #21) As a workaround in gcc I suggest to strip -lm in the darwin specific specs one could also suggest the following patch to unix.exp (or providing a darwin infrastructure):

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

2009-12-09 Thread howarth at nitro dot med dot uc dot edu
--- Comment #23 from howarth at nitro dot med dot uc dot edu 2009-12-09 16:47 --- Wouldn't that be limited to a subset of darwin @@ -30,8 +30,8 @@ #set_board_info host_library_path [file dirname [file dirname [file dirname [file dirname [file dirname [exec [find_gcc]

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

2009-12-09 Thread developer at sandoe-acoustics dot co dot uk
--- Comment #24 from developer at sandoe-acoustics dot co dot uk 2009-12-09 17:36 --- (In reply to comment #21) As a workaround in gcc I suggest to strip -lm in the darwin specific specs processing. Otherwise this is not a GCC bug (again), but a darwin bug - why do they always

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

2009-12-09 Thread mrs at apple dot com
--- Comment #25 from mrs at apple dot com 2009-12-09 18:29 --- I've filed radr://7457013 for libSystem (aka libm on 10.6) to improve the accuracy of ___divdc3. If that were fixed, then having -lm or not wouldn't matter. -- mrs at apple dot com changed: What|Removed

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

2009-12-09 Thread howarth at nitro dot med dot uc dot edu
--- Comment #26 from howarth at nitro dot med dot uc dot edu 2009-12-09 18:40 --- I am still a bit confused about this bug. When we leave -lm out of the linkage of builtin-math-7.exe, where does the ___divdc3 call get resolved from? Shouldn't it be coming libSystem since that always

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

2009-12-09 Thread mrs at apple dot com
--- Comment #27 from mrs at apple dot com 2009-12-09 18:48 --- nm | grep ___divdc3 on all the objects and libraries on the link line, will tell you from where this symbol can be resolved. Reading the link line, will tell you the order ld will resolve in, but you have to realize that

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

2009-12-09 Thread ghazi at gcc dot gnu dot org
--- Comment #28 from ghazi at gcc dot gnu dot org 2009-12-09 18:55 --- (In reply to comment #26) I am still a bit confused about this bug. When we leave -lm out of the linkage of builtin-math-7.exe, where does the ___divdc3 call get resolved from? The ___divdc3 function is defined in

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

2009-12-09 Thread howarth at nitro dot med dot uc dot edu
--- Comment #29 from howarth at nitro dot med dot uc dot edu 2009-12-09 23:06 --- Ah, I understand now gcc-4 -O2 builtin-math-7-reduced.c ./a.out otool -L ./a.out ./a.out: /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 246.0.0)

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

2009-12-08 Thread dominiq at lps dot ens dot fr
--- Comment #1 from dominiq at lps dot ens dot fr 2009-12-08 16:33 --- As such, it isn't necessarily a bug in GCC, however this PR will help track if there is a possible workaround. As far as I understand the use of the gcc compilers on darwin, I do not see when I should use -lm. So

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

2009-12-08 Thread ghazi at gcc dot gnu dot org
--- Comment #2 from ghazi at gcc dot gnu dot org 2009-12-08 16:46 --- (In reply to comment #1) As such, it isn't necessarily a bug in GCC, however this PR will help track if there is a possible workaround. As far as I understand the use of the gcc compilers on darwin, I do not see

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

2009-12-08 Thread dominiq at lps dot ens dot fr
--- Comment #3 from dominiq at lps dot ens dot fr 2009-12-08 18:31 --- (In reply to comment #2) I don't think that's the right approach, that would only mask the bug in the testsuite but leave it in userland. ... You are right, but from what follows I think the problem comes from the

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

2009-12-08 Thread howarth at nitro dot med dot uc dot edu
--- Comment #4 from howarth at nitro dot med dot uc dot edu 2009-12-08 19:30 --- Dominique, It would be interesting to know what happens with a build of gcc trunk under darwin10 if you regress out the r154282 and r154283 that introduced the libgcc_ext feature . I suspect this

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

2009-12-08 Thread dominiq at lps dot ens dot fr
--- Comment #5 from dominiq at lps dot ens dot fr 2009-12-08 19:34 --- Additional information: (1) I don't see the problem on (i686|x86_64)-apple-darwin9. (2) I also see it gcc version 4.4.2 (GCC). (3) I don't see it with gcc version 4.2.1 (Apple Inc. build 5646) (dot 1). (3) If I

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

2009-12-08 Thread howarth at nitro dot med dot uc dot edu
--- Comment #6 from howarth at nitro dot med dot uc dot edu 2009-12-08 19:59 --- Considering that builtin-math-7.c doesn't exist in gcc 4.4 branch, it is unclear what that test should do there. Try reverting out the libgcc_ext changes from gcc trunk on darwin10 instead. --

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

2009-12-08 Thread ghazi at gcc dot gnu dot org
--- Comment #7 from ghazi at gcc dot gnu dot org 2009-12-08 20:24 --- (In reply to comment #6) Considering that builtin-math-7.c doesn't exist in gcc 4.4 branch, it is unclear what that test should do there. Jack - Focusing on builtin-math-7.c (which tests multiple things) misses

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

2009-12-08 Thread developer at sandoe-acoustics dot co dot uk
--- Comment #8 from developer at sandoe-acoustics dot co dot uk 2009-12-08 20:27 --- (In reply to comment #6) A *Very* quick look following a prompt from Jack... Considering that builtin-math-7.c doesn't exist in gcc 4.4 branch, it is unclear what that test should do there. Try

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

2009-12-08 Thread developer at sandoe-acoustics dot co dot uk
--- Comment #9 from developer at sandoe-acoustics dot co dot uk 2009-12-08 20:51 --- version 125.0.0) /usr/lib/system/libmathCommon.A.dylib (compatibility version 1.0.0, current version 315.0.0) [macbook] f90/bug% nm /usr/lib/libSystem.B.dylib | grep divdc3 0019fa1e S

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

2009-12-08 Thread dominiq at lps dot ens dot fr
--- Comment #10 from dominiq at lps dot ens dot fr 2009-12-08 21:29 --- For Darwin 9 there is no system provided ___divdc3 (AFAICT) .. it is supplied from libgcc_s.1.dylib. I see: [ibook-dhum] f90/bug% nm /usr/lib/libm.dylib | grep divdc3 00131270 t ___divdc3 if this is a

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

2009-12-08 Thread dominiq at lps dot ens dot fr
--- Comment #11 from dominiq at lps dot ens dot fr 2009-12-08 22:13 --- I think I understand why apple gcc42 does not show the problem: it does not call ___divdc3: [macbook] f90/bug% diff -up pr42333_42.s pr42333_45.s --- pr42333_42.s2009-12-08 23:00:29.0 +0100 +++

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

2009-12-08 Thread developer at sandoe-acoustics dot co dot uk
--- Comment #12 from developer at sandoe-acoustics dot co dot uk 2009-12-08 23:40 --- (In reply to comment #11) I think I understand why apple gcc42 does not show the problem: it does not call ___divdc3: [macbook] f90/bug% diff -up pr42333_42.s pr42333_45.s --- pr42333_42.s

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

2009-12-08 Thread ghazi at gcc dot gnu dot org
--- 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

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

2009-12-08 Thread ghazi at gcc dot gnu dot org
--- Comment #14 from ghazi at gcc dot gnu dot org 2009-12-09 00:06 --- (In reply to comment #11) I think I understand why apple gcc42 does not show the problem: it does not call ___divdc3: It is possible that some versions of GCC (Apple's and/or FSF's) inline the assembly code to do

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

2009-12-08 Thread howarth at nitro dot med dot uc dot edu
--- Comment #15 from howarth at nitro dot med dot uc dot edu 2009-12-09 00:12 --- (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. This may be impossible

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

2009-12-08 Thread howarth at nitro dot med dot uc dot edu
--- Comment #16 from howarth at nitro dot med dot uc dot edu 2009-12-09 00:19 --- I can confirm that the gcc.dg/torture/builtin-math-7.c testcases still fail under darwin10 if the libgcc_ext changes are regressed out. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42333

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

2009-12-08 Thread ghazi at gcc dot gnu dot org
--- Comment #17 from ghazi at gcc dot gnu dot org 2009-12-09 00:34 --- (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. This

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

2009-12-08 Thread howarth at nitro dot med dot uc dot edu
--- Comment #18 from howarth at nitro dot med dot uc dot edu 2009-12-09 01:11 --- Actually, I found this file which is quite interesting in the darwin10 libgcc open source release... http://www.opensource.apple.com/source/libgcc/libgcc-13/stub.c --