This is how I have compiled a fortran 77 file with gfortran 4.8.5
gfortran -Wall -O0 -c -g -fbacktrace -ffpe-trap=invalid,denormal,zero,overflow,underflow ${tool}.f ${ncdf_incs}
and then I run it and I get this floating point exception
Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.
Backtrace for this error:
#0 0x7F9AC3077E08
#1 0x7F9AC3076F90
#2 0x7F9AC29BE4AF
#3 0x404894 in psiappsor at inv_cart.f:1221
#4 0x40F7E8 in MAIN__ at inv_cart.f:159
Floating exception (core dumped)
I am unable to tell what type of FPE it is. The same file compiled with pgf77 /pgf90 is able to let me know that it is a divide by zero FPE. What do I do to get the type of FPE the code is throwing with gfortran?
UPDATE I tried this with gfortran 5.4 and I get the same problem. It does not tell you what sort of FPE it is.