Re: -ffloat-store behavior (Re: Susprising behavior of gcc on x86 (-m32))

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 9, 2015 at 8:07 AM, Mathieu Malaterre <malat@xxxxxxxxxx> wrote:
> Manuel,
>
> On Tue, Sep 8, 2015 at 11:31 PM, Manuel López-Ibáñez
> <lopezibanez@xxxxxxxxx> wrote:
>> On 08/09/15 22:05, Mathieu Malaterre wrote:
>>>
>>>
>>> Ok, I think I understand now. -O0 did produce code that is compatible
>>> with -ffloat-store. However I am still required to use -ffloat-store
>>> (explicitly) for any other optimization (at least required with -O2 in
>>> my case).
>>
>>
>> You are not required to use -ffloat-store, neither is -ffloat-store
>> guaranteed to work. Please read https://gcc.gnu.org/wiki/FAQ#PR323
>>
>> (If there is something that is not explained there, it would be better to
>> expand the answer rather than reply here with bits of info.)
>
> Thanks for the link. However -in my case- the compile option
> `-fexcess-precision=standard` does produce the same code as
> `-ffloat-store`. At least for

Meant to say `does not produce`

> [...]
> double div; /* OPJ_FLOAT64 */
> div = dd / dr;
> if (div >= thresh)
> [...]
>
> Is there a longer description for `-fexcess-precision=standard` which
> explains case of failures ?

>From a clean debian/sid 32bits chroot I can no longer reproduce this.
In summary:

1. removed -ffast-math
2. add -std=c99
3. Change the code for an explicit storage of division (div = dd / dr)
=> issue solved !

Thx




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux