Fortran Wiki
Debugging tools

Useful compiling options

Unfortunately, compiling options depend on the used compiler

g95

-g -fbounds-check -Wall -ftrace=full

Additional useful environment variables:

On Linux/UNIX with bourne shell:

export G95_FPU_INVALID=1
export G95_FPU_ZERODIV=1
export G95_FPU_OVERFLOW=1
export G95_MEM_INIT=NAN

gfortran

-g -Wall -Wextra -Warray-temporaries -Wconversion -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=invalid,zero,overflow,underflow -finit-real=nan

ifort

-g -check all -fpe0 -warn -traceback -debug extended

nag95

-g -C=all -nan

Sun F95

-g -xcheck=%all -fnonstd

lf95

-g  --ap --chk

Debuggers

Other tools