aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRimvydas Jasinskas <rimvydas.jas@gmail.com>2023-12-23 18:59:09 +0000
committerHarald Anlauf <anlauf@gmx.de>2023-12-28 21:07:10 +0100
commit2cb93e6686e4af5725d8c919cf19f535a7f3aa33 (patch)
treed45be50cf3f15427d9518cd4b58e32e1faed464e /gcc
parentbf5c00d7eed5282fd80a69955ce471ac866c149d (diff)
downloadgcc-2cb93e6686e4af5725d8c919cf19f535a7f3aa33.zip
gcc-2cb93e6686e4af5725d8c919cf19f535a7f3aa33.tar.gz
gcc-2cb93e6686e4af5725d8c919cf19f535a7f3aa33.tar.bz2
Fortran: Add Developer Options mini-section to documentation
Separate out -fdump-* options to the new section. Sort by option name. While there, document -save-temps intermediates. gcc/fortran/ChangeLog: PR fortran/81615 * invoke.texi: Add Developer Options section. Move '-fdump-*' to it. Add small examples about changed '-save-temps' behavior. Signed-off-by: Rimvydas Jasinskas <rimvydas.jas@gmail.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/invoke.texi117
1 files changed, 77 insertions, 40 deletions
diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi
index c7fd019..5d526e2 100644
--- a/gcc/fortran/invoke.texi
+++ b/gcc/fortran/invoke.texi
@@ -94,12 +94,13 @@ one is not the default.
compiled.
* Preprocessing Options:: Enable and customize preprocessing.
* Error and Warning Options:: How picky should the compiler be?
-* Debugging Options:: Symbol tables, measurements, and debugging dumps.
+* Debugging Options:: Symbol tables, measurements.
* Directory Options:: Where to find module files
* Link Options :: Influencing the linking step
* Runtime Options:: Influencing runtime behavior
* Code Gen Options:: Specifying conventions for function calls, data layout
and register usage.
+* Developer Options:: Printing GNU Fortran specific info, debugging dumps.
* Interoperability Options:: Options for interoperability with other
languages.
* Environment Variables:: Environment variables that affect @command{gfortran}.
@@ -159,9 +160,8 @@ and warnings}.
}
@item Debugging Options
-@xref{Debugging Options,,Options for debugging your program or GNU Fortran}.
-@gccoptlist{-fbacktrace -fdump-fortran-optimized -fdump-fortran-original
--fdebug-aux-vars -fdump-fortran-global -fdump-parse-tree -ffpe-trap=@var{list}
+@xref{Debugging Options,,Options for debugging your program}.
+@gccoptlist{-fbacktrace -fdebug-aux-vars -ffpe-trap=@var{list}
-ffpe-summary=@var{list}
}
@@ -201,6 +201,12 @@ and warnings}.
-fpack-derived -frealloc-lhs -frecursive -frepack-arrays
-fshort-enums -fstack-arrays
}
+
+@item Developer Options
+@xref{Developer Options,,GNU Fortran Developer Options}.
+@gccoptlist{-fdump-fortran-global -fdump-fortran-optimized
+-fdump-fortran-original -fdump-parse-tree -save-temps
+}
@end table
@node Fortran Dialect Options
@@ -1280,40 +1286,14 @@ and other GNU compilers.
Some of these have no effect when compiling programs written in Fortran.
@node Debugging Options
-@section Options for debugging your program or GNU Fortran
+@section Options for debugging your program
@cindex options, debugging
@cindex debugging information options
GNU Fortran has various special options that are used for debugging
-either your program or the GNU Fortran compiler.
+your program.
@table @gcctabopt
-@opindex @code{fdump-fortran-original}
-@item -fdump-fortran-original
-Output the internal parse tree after translating the source program
-into internal representation. This option is mostly useful for
-debugging the GNU Fortran compiler itself. The output generated by
-this option might change between releases. This option may also
-generate internal compiler errors for features which have only
-recently been added.
-
-@opindex @code{fdump-fortran-optimized}
-@item -fdump-fortran-optimized
-Output the parse tree after front-end optimization. Mostly useful for
-debugging the GNU Fortran compiler itself. The output generated by
-this option might change between releases. This option may also
-generate internal compiler errors for features which have only
-recently been added.
-
-@opindex @code{fdump-parse-tree}
-@item -fdump-parse-tree
-Output the internal parse tree after translating the source program
-into internal representation. Mostly useful for debugging the GNU
-Fortran compiler itself. The output generated by this option might
-change between releases. This option may also generate internal
-compiler errors for features which have only recently been added. This
-option is deprecated; use @code{-fdump-fortran-original} instead.
-
@opindex @code{fdebug-aux-vars}
@item -fdebug-aux-vars
Renames internal variables created by the gfortran front end and makes
@@ -1323,14 +1303,6 @@ useful for debugging the compiler's code generation together with
@code{-fdump-tree-original} and enabling debugging of the executable
program by using @code{-g} or @code{-ggdb3}.
-@opindex @code{fdump-fortran-global}
-@item -fdump-fortran-global
-Output a list of the global identifiers after translating into
-middle-end representation. Mostly useful for debugging the GNU Fortran
-compiler itself. The output generated by this option might change
-between releases. This option may also generate internal compiler
-errors for features which have only recently been added.
-
@opindex @code{ffpe-trap=}@var{list}
@item -ffpe-trap=@var{list}
Specify a list of floating point exception traps to enable. On most
@@ -1543,6 +1515,71 @@ and regards zero as positive number in the @code{SIGN} intrinsic for
compatibility with Fortran 77. The default is @option{-fsign-zero}.
@end table
+@node Developer Options
+@section GNU Fortran Developer Options
+@cindex options, debugging
+@cindex developer options
+
+GNU Fortran has various special options that are used for debugging
+the GNU Fortran compiler.
+
+@table @gcctabopt
+@opindex @code{fdump-fortran-global}
+@item -fdump-fortran-global
+Output a list of the global identifiers after translating into
+middle-end representation. Mostly useful for debugging the GNU Fortran
+compiler itself. The output generated by this option might change
+between releases. This option may also generate internal compiler
+errors for features which have only recently been added.
+
+@opindex @code{fdump-fortran-optimized}
+@item -fdump-fortran-optimized
+Output the parse tree after front-end optimization. Mostly useful for
+debugging the GNU Fortran compiler itself. The output generated by
+this option might change between releases. This option may also
+generate internal compiler errors for features which have only
+recently been added.
+
+@opindex @code{fdump-fortran-original}
+@item -fdump-fortran-original
+Output the internal parse tree after translating the source program
+into internal representation. This option is mostly useful for
+debugging the GNU Fortran compiler itself. The output generated by
+this option might change between releases. This option may also
+generate internal compiler errors for features which have only
+recently been added.
+
+@opindex @code{fdump-parse-tree}
+@item -fdump-parse-tree
+Output the internal parse tree after translating the source program
+into internal representation. Mostly useful for debugging the GNU
+Fortran compiler itself. The output generated by this option might
+change between releases. This option may also generate internal
+compiler errors for features which have only recently been added. This
+option is deprecated; use @code{-fdump-fortran-original} instead.
+
+@item -save-temps
+Store the usual ``temporary'' intermediate files permanently; name them
+as auxiliary output files, as specified described under GCC
+@option{-dumpbase} and @option{-dumpdir}.
+
+@smallexample
+gfortran -save-temps -c foo.F90
+@end smallexample
+
+preprocesses input file @file{foo.F90} to @file{foo.fii}, compiles to an
+intermediate @file{foo.s}, and then assembles to the (implied) output
+file @file{foo.o}, whereas:
+
+@smallexample
+gfortran -save-temps -S foo.F
+@end smallexample
+
+saves the preprocessor output in @file{foo.fi}, and then compiles to
+the (implied) output file @file{foo.s}.
+
+@end table
+
@node Code Gen Options
@section Options for code generation conventions
@cindex code generation, conventions