This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: SIGFPE, Arithmetic exception. "Value optimized out" when using --ffast-math
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Paul van Delst <Paul dot Vandelst at noaa dot gov>
- Cc: gfortran mailing list <fortran at gcc dot gnu dot org>
- Date: Wed, 29 Jun 2011 14:02:37 -0700
- Subject: Re: SIGFPE, Arithmetic exception. "Value optimized out" when using --ffast-math
- References: <4E0B8B0C.4020105@noaa.gov>
On Wed, Jun 29, 2011 at 04:29:00PM -0400, Paul van Delst wrote:
>
> As I mentioned above, if we remove the --ffast-math option
> during compilation, the code run correctly through to completion.
>
> Is this related in any way to:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40005
> ?
Are you sure you grabbed the right PR number? If my
quick scan of the audit trail for 40005 is correct,
40005 was concerned with a segfault of gfortran not
the executable created by gfortran.
> If so, is there a fix for the v4.4 of gfortran on x86_64?
> We won't be allowed to install 4.5 or 4.6 until RHE6 passes
> whatever security tests they are currently being subjected to).
Given the above statement, I suspect that the code is
unavailable to gfortran developers. The only way to
know with certainty if 4.5 or 4.6 works for your code
is to try them.
PS: I rarely use --fast-math when I compile my own codes.
It is a misnamed option in IMHO. Yes, one may get a faster
executable. Unfortunately, one may also get the wrong result.
FWIW, my typical set of options are
-O2 -pipe -march=native -funroll-loops -ftree-vectorize
--
Steve