Hi Joost, 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. Cheers, Dominique