public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mathieu Malaterre <malat@debian.org>
To: "Manuel López-Ibáñez" <lopezibanez@gmail.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>, Andrew Haley <aph@redhat.com>,
		Markus Trippelsdorf <markus@trippelsdorf.de>
Subject: Re: -ffloat-store behavior (Re: Susprising behavior of gcc on x86 (-m32))
Date: Wed, 09 Sep 2015 07:19:00 -0000	[thread overview]
Message-ID: <CA+7wUsys_atQyzAcjmO18PouJDpm80sUrwvSAPgKdMDDjAjfjw@mail.gmail.com> (raw)
In-Reply-To: <CA+7wUsy91DEsUV8T97W=mLFGBp2cALv5KGo9Vi+9s+W_HB4JFA@mail.gmail.com>

On Wed, Sep 9, 2015 at 8:07 AM, Mathieu Malaterre <malat@debian.org> wrote:
> Manuel,
>
> On Tue, Sep 8, 2015 at 11:31 PM, Manuel López-Ibáñez
> <lopezibanez@gmail.com> 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

  reply	other threads:[~2015-09-09  7:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-08 20:00 Mathieu Malaterre
2015-09-08 20:05 ` Mathieu Malaterre
2015-09-08 21:31   ` Manuel López-Ibáñez
2015-09-09  5:19     ` Markus Trippelsdorf
2015-09-09  6:08     ` Mathieu Malaterre
2015-09-09  7:19       ` Mathieu Malaterre [this message]
2015-09-09  8:58         ` Andrew Haley
2015-09-09  9:24         ` Manuel López-Ibáñez
2015-09-09 13:32           ` Mathieu Malaterre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+7wUsys_atQyzAcjmO18PouJDpm80sUrwvSAPgKdMDDjAjfjw@mail.gmail.com \
    --to=malat@debian.org \
    --cc=aph@redhat.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=lopezibanez@gmail.com \
    --cc=markus@trippelsdorf.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).