This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, Fortan] fix initialization of flag_errno_math and flag_associative_math
- From: dominiq at lps dot ens dot fr (Dominique Dhumieres)
- To: fortran at gcc dot gnu dot org
- Cc: gcc-patches at gcc dot gnu dot org, joost dot vandevondele at mat dot ethz dot ch
- Date: Sat, 31 May 2014 13:01:17 +0200
- Subject: Re: [PATCH, Fortan] fix initialization of flag_errno_math and flag_associative_math
- Authentication-results: sourceware.org; auth=none
Why do you want -fno-math-errno to be the default for gfortran?
AFAICT such default is not documented and the flag works
(checked on your test gfortran.dg/errnocheck_1.f90).
For -fassociative-math, the manual says
For Fortran the option is automatically enabled when both -fno-signed-zeros and -fno-trapping-math are in effect.
and again AFAICT this is not working (checked on your test
gfortran.dg/associative_1.f90) while I see
/* Fortran allows associative math - but we cannot reassociate if
we want traps or signed zeros. Cf. also flag_protect_parens. */
if (flag_associative_math == -1)
flag_associative_math = (!flag_trapping_math && !flag_signed_zeros);
in gcc/fortran/options.c. Why this is not working is beyond my understanding,
but I am not sure that your fix is the right one.