This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [fortran,patch] Support for IEEE underflow control on x86/x86_64
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: FX <fxcoudert at gmail dot com>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 3 Jul 2014 12:24:49 +0200
- Subject: Re: [fortran,patch] Support for IEEE underflow control on x86/x86_64
- Authentication-results: sourceware.org; auth=none
- References: <184DE738-2E8A-4310-A1FB-8BF351C2F88A at gmail dot com> <CAFULd4apPf0hQSARz2QKNjTCU3m24YQi3mFU0mUWV5RbwdwOkg at mail dot gmail dot com> <16088B84-9CED-48A1-BC04-87C8FD98FCB3 at gmail dot com>
On Thu, Jul 3, 2014 at 11:42 AM, FX <fxcoudert@gmail.com> wrote:
>> (I don't think -O0 is needed, but have to check with a testsuite run.)
>
> On x86_64-apple-darwin, -O0 or -O1 are needed: at -O2 my âuse_realâ call is optimized out anyway, and the division simplified at compile time.
You can mark variables with:
real, volatile :: x
double precision, volatile :: y
and you don't even need the call to use_real anymore.
I have tested on alpha that this approach works for all optimization levels.
Uros.