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 -fbounds-check -Wall -fbacktrace -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