2.5 Options for debugging your program or GNU Fortran
GNU Fortran has various special options that are used for debugging
either your program or the GNU Fortran compiler.
-fdump-fortran-original
- Output the internal parse tree after translating the source program
into internal representation. Only really useful for debugging the
GNU Fortran compiler itself.
-fdump-optimized-tree
- Output the parse tree after front-end optimization. Only really
useful for debugging the GNU Fortran compiler itself.
Output the internal parse tree after translating the source program
into internal representation. Only really useful for debugging the
GNU Fortran compiler itself. This option is deprecated; use
-fdump-fortran-original
instead.
-ffpe-trap=
list- Specify a list of IEEE exceptions when a Floating Point Exception
(FPE) should be raised. On most systems, this will result in a SIGFPE
signal being sent and the program being interrupted, producing a core
file useful for debugging. list is a (possibly empty) comma-separated
list of the following IEEE exceptions: ‘invalid’ (invalid floating
point operation, such as
SQRT(-1.0)
), ‘zero’ (division by
zero), ‘overflow’ (overflow in a floating point operation),
‘underflow’ (underflow in a floating point operation),
‘precision’ (loss of precision during operation) and ‘denormal’
(operation produced a denormal value).
Some of the routines in the Fortran runtime library, like
‘CPU_TIME’, are likely to trigger floating point exceptions when
ffpe-trap=precision
is used. For this reason, the use of
ffpe-trap=precision
is not recommended.
-fbacktrace
- Specify that, when a runtime error is encountered or a deadly signal is
emitted (segmentation fault, illegal instruction, bus error or
floating-point exception), the Fortran runtime
library should output a backtrace of the error. This option
only has influence for compilation of the Fortran main program.
-fdump-core
- Request that a core-dump file is written to disk when a runtime error
is encountered on systems that support core dumps. This option is
only effective for the compilation of the Fortran main program.
See Options for Debugging Your Program or GCC, for more information on
debugging options.