[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU Guile 2.1.5 released (beta)
From: |
Matt Wette |
Subject: |
Re: GNU Guile 2.1.5 released (beta) |
Date: |
Sun, 8 Jan 2017 15:28:15 -0800 |
> On Jan 8, 2017, at 3:01 PM, Andy Wingo <address@hidden> wrote:
>
> On Tue 20 Dec 2016 23:58, Matt Wette <address@hidden> writes:
>
>> With the patch below I can get through all the tests on my Mac (macOS
>> 10.12.2) if I use default flags (i.e., -g -O2) and gcc-4.9 (now verifying
>> also w/ gcc-6.2). The patch is a hack to
>> get around an apparent optimization that thinks the sine of -0.0 is +0.0.
>>
>> Matt
>>
>> --- libguile/numbers.c-orig 2016-11-21 13:56:23.000000000 -0800
>> +++ libguile/numbers.c 2016-12-20 14:43:58.000000000 -0800
>> @@ -9099,6 +9099,9 @@
>> #undef FUNC_NAME
>>
>> SCM
>> +#ifdef __APPLE__
>> +__attribute__((optimize("O0")))
>> +#endif
>> scm_c_make_polar (double mag, double ang)
>> {
>> double s, c;
>
> Aaah, thank you for tracking this one down! So. I assume that with GCC
> (any version) everything is fine. This is apparently an optimization in
> LLVM. But... is LLVM wrong, or are we wrong? I guess LLVM is wrong,
> right, since the result depends on the optimization level? Surely we
> should be able to produce a nice compiler bug report out of this :)
I’m still not sure this is a bug. I have a gut feeling there are some
lingering issues on the Mac port. I think this breaks w/ gcc also. I will try
again to verify.
Matt