<html lang="en"> <head> <title>Debugging Options - The GNU Fortran Compiler</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="The GNU Fortran Compiler"> <meta name="generator" content="makeinfo 4.13"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="Invoking-GNU-Fortran.html#Invoking-GNU-Fortran" title="Invoking GNU Fortran"> <link rel="prev" href="Error-and-Warning-Options.html#Error-and-Warning-Options" title="Error and Warning Options"> <link rel="next" href="Directory-Options.html#Directory-Options" title="Directory Options"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <!-- Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being ``Funding Free Software'', the Front-Cover Texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the section entitled ``GNU Free Documentation License''. (a) The FSF's Front-Cover Text is: A GNU Manual (b) The FSF's Back-Cover Text is: You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development.--> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <a name="Debugging-Options"></a> <p> Next: <a rel="next" accesskey="n" href="Directory-Options.html#Directory-Options">Directory Options</a>, Previous: <a rel="previous" accesskey="p" href="Error-and-Warning-Options.html#Error-and-Warning-Options">Error and Warning Options</a>, Up: <a rel="up" accesskey="u" href="Invoking-GNU-Fortran.html#Invoking-GNU-Fortran">Invoking GNU Fortran</a> <hr> </div> <h3 class="section">2.5 Options for debugging your program or GNU Fortran</h3> <p><a name="index-options_002c-debugging-174"></a><a name="index-debugging-information-options-175"></a> GNU Fortran has various special options that are used for debugging either your program or the GNU Fortran compiler. <dl> <dt><code>-fdump-fortran-original</code><dd><a name="index-g_t_0040code_007bfdump_002dfortran_002doriginal_007d-176"></a>Output the internal parse tree after translating the source program into internal representation. Only really useful for debugging the GNU Fortran compiler itself. <br><dt><code>-fdump-optimized-tree</code><dd><a name="index-g_t_0040code_007bfdump_002dfortran_002doptimized_007d-177"></a>Output the parse tree after front-end optimization. Only really useful for debugging the GNU Fortran compiler itself. <p><a name="index-g_t_0040code_007bfdump_002dparse_002dtree_007d-178"></a>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 <code>-fdump-fortran-original</code> instead. <br><dt><code>-ffpe-trap=</code><var>list</var><dd><a name="index-g_t_0040code_007bffpe_002dtrap_003d_007d_0040var_007blist_007d-179"></a>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. <var>list</var> is a (possibly empty) comma-separated list of the following IEEE exceptions: ‘<samp><span class="samp">invalid</span></samp>’ (invalid floating point operation, such as <code>SQRT(-1.0)</code>), ‘<samp><span class="samp">zero</span></samp>’ (division by zero), ‘<samp><span class="samp">overflow</span></samp>’ (overflow in a floating point operation), ‘<samp><span class="samp">underflow</span></samp>’ (underflow in a floating point operation), ‘<samp><span class="samp">precision</span></samp>’ (loss of precision during operation) and ‘<samp><span class="samp">denormal</span></samp>’ (operation produced a denormal value). <p>Some of the routines in the Fortran runtime library, like ‘<samp><span class="samp">CPU_TIME</span></samp>’, are likely to trigger floating point exceptions when <code>ffpe-trap=precision</code> is used. For this reason, the use of <code>ffpe-trap=precision</code> is not recommended. <br><dt><code>-fbacktrace</code><dd><a name="index-g_t_0040code_007bfbacktrace_007d-180"></a><a name="index-backtrace-181"></a><a name="index-trace-182"></a>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. <br><dt><code>-fdump-core</code><dd><a name="index-core_002c-dump-183"></a><a name="index-g_t_0040code_007bfdump_002dcore_007d-184"></a>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. </dl> <p>See <a href="../gcc/Debugging-Options.html#Debugging-Options">Options for Debugging Your Program or GCC</a>, for more information on debugging options. </body></html>