I am trying to debug a Fortran program. To catch floating point errors, I'm using the following compiler options for gfortran 4.9.0:
FFLAGS1 = -std=f2003 -ffree-form -fdefault-real-8 -fdefault-double-8 \
-Ofast -fall-intrinsics -fcheck=all -m64 \
-fno-trapping-math -c \
-ffpe-trap=invalid,zero,overflow,underflow,precision,denormal -Wall
With these options, the program fails at this line:
read(ctrlUnit,*) slope_fasst, aspect
when trying to read these inputs: 10.0 70.0
If I remove
-ffpe-trap=invalid,zero,overflow,underflow,precision,denormal
from the compiler options, it reads the following line just fine. Both variables are declared as real(8)
. In the input file, I've tried spaces, commas, etc. but see no changes. Does anyone have a suggestion?