Documentation part. The makeinfo gcc/fortran/gfortran.texi does not seem to have any new warnings. Is there a specific reason thy -fc-prototypes (Interoperability Options section) is excluded from manpage?
Regards, Rimvydas
From 3adb6cd8a2aa1576a8ff63b280239e725f1f112e Mon Sep 17 00:00:00 2001 From: Rimvydas Jasinskas <rimvydas....@gmail.com> Date: Sat, 23 Dec 2023 18:59:09 +0000 Subject: 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: * invoke.texi: Add Developer Options section. Move '-fdump-*' to it. Add small examples about changed '-save-temps' behavior. Signed-off-by: Rimvydas Jasinskas <rimvydas....@gmail.com> --- gcc/fortran/invoke.texi | 117 ++++++++++++++++++++++++++-------------- 1 file changed, 77 insertions(+), 40 deletions(-) diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index c7fd019a7c5..6b85fb8dff0 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 to in @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 (no longer) temporary preprocessed file 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 -- 2.43.0