Commit c8cf50e4 by Brooks Moses Committed by Brooks Moses

gfortran.texi: Added TeX support for document parts...

* gfortran.texi: Added TeX support for document parts;
rearranged existing text into "About GNU Fortran",
"Invoking GNU Fortran", and "Language Reference" parts.

From-SVN: r119981
parent 04b201a2
2006-12-16 Brooks Moses <brooks.moses@codesourcery.com>
* gfortran.texi: Added TeX support for document parts;
rearranged existing text into "About GNU Fortran",
"Invoking GNU Fortran", and "Language Reference" parts.
2006-12-15 Jerry DeLisle <jvdelisle@gcc.gnu.org> 2006-12-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/30200 PR fortran/30200
......
...@@ -16,6 +16,45 @@ ...@@ -16,6 +16,45 @@
@syncodeindex pg cp @syncodeindex pg cp
@syncodeindex tp cp @syncodeindex tp cp
@c TODO: The following "Part" definitions are included here temporarily
@c until they are incorporated into the official Texinfo distribution.
@c They borrow heavily from Texinfo's \unnchapentry definitions.
@tex
\gdef\part#1#2{%
\pchapsepmacro
\gdef\thischapter{}
\begingroup
\vglue\titlepagetopglue
\titlefonts \rm
\leftline{Part #1:@* #2}
\vskip4pt \hrule height 4pt width \hsize \vskip4pt
\endgroup
\writetocentry{part}{#2}{#1}
}
\gdef\blankpart{%
\writetocentry{blankpart}{}{}
}
% Part TOC-entry definition for summary contents.
\gdef\dosmallpartentry#1#2#3#4{%
\vskip .5\baselineskip plus.2\baselineskip
\begingroup
\let\rm=\bf \rm
\tocentry{Part #2: #1}{\doshortpageno\bgroup#4\egroup}
\endgroup
}
\gdef\dosmallblankpartentry#1#2#3#4{%
\vskip .5\baselineskip plus.2\baselineskip
}
% Part TOC-entry definition for regular contents. This has to be
% equated to an existing entry to not cause problems when the PDF
% outline is created.
\gdef\dopartentry#1#2#3#4{%
\unnchapentry{Part #2: #1}{}{#3}{#4}
}
\gdef\doblankpartentry#1#2#3#4{}
@end tex
@c %**end of header @c %**end of header
@c Use with @@smallbook. @c Use with @@smallbook.
...@@ -94,8 +133,22 @@ Boston, MA 02110-1301, USA@* ...@@ -94,8 +133,22 @@ Boston, MA 02110-1301, USA@*
@sp 1 @sp 1
@insertcopying @insertcopying
@end titlepage @end titlepage
@c TODO: The following "Part" definitions are included here temporarily
@c until they are incorporated into the official Texinfo distribution.
@tex
\global\let\partentry=\dosmallpartentry
\global\let\blankpartentry=\dosmallblankpartentry
@end tex
@summarycontents @summarycontents
@tex
\global\let\partentry=\dopartentry
\global\let\blankpartentry=\doblankpartentry
@end tex
@contents @contents
@page @page
@node Top @node Top
...@@ -118,16 +171,23 @@ not accurately reflect the status of the most recent GNU Fortran compiler. ...@@ -118,16 +171,23 @@ not accurately reflect the status of the most recent GNU Fortran compiler.
@comment better formatting. @comment better formatting.
@comment @comment
@menu @menu
Part I: About GNU Fortran
* Getting Started:: What you should know about GNU Fortran. * Getting Started:: What you should know about GNU Fortran.
* GNU Fortran and GCC:: You can compile Fortran, C, or other programs. * GNU Fortran and GCC:: You can compile Fortran, C, or other programs.
* GNU Fortran and G77:: Why we chose to start from scratch. * GNU Fortran and G77:: Why we chose to start from scratch.
* Invoking GNU Fortran:: Command options supported by @command{gfortran}.
* Project Status:: Status of GNU Fortran, roadmap, proposed extensions. * Project Status:: Status of GNU Fortran, roadmap, proposed extensions.
* Contributing:: How you can help.
* Standards:: Standards supported by GNU Fortran. * Standards:: Standards supported by GNU Fortran.
Part II: Invoking GNU Fortran
* Invoking GNU Fortran:: Command options supported by @command{gfortran}.
* Runtime:: Influencing runtime behavior with environment variables. * Runtime:: Influencing runtime behavior with environment variables.
Part III: Language Reference
* Fortran 2003 status:: Fortran 2003 features supported by GNU Fortran.
* Extensions:: Language extensions implemented by GNU Fortran. * Extensions:: Language extensions implemented by GNU Fortran.
* Intrinsic Procedures:: Intrinsic procedures supported by GNU Fortran. * Intrinsic Procedures:: Intrinsic procedures supported by GNU Fortran.
* Contributing:: How you can help.
* Copying:: GNU General Public License says * Copying:: GNU General Public License says
how you can copy and share GNU Fortran. how you can copy and share GNU Fortran.
* GNU Free Documentation License:: * GNU Free Documentation License::
...@@ -137,6 +197,13 @@ not accurately reflect the status of the most recent GNU Fortran compiler. ...@@ -137,6 +197,13 @@ not accurately reflect the status of the most recent GNU Fortran compiler.
@end menu @end menu
@c =====================================================================
@c PART I: ABOUT GNU FORTRAN
@c =====================================================================
@tex
\part{I}{About GNU Fortran}
@end tex
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
@c Getting Started @c Getting Started
...@@ -255,7 +322,6 @@ programs will call it for you. ...@@ -255,7 +322,6 @@ programs will call it for you.
@end itemize @end itemize
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
@c GNU Fortran and GCC @c GNU Fortran and GCC
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
...@@ -308,7 +374,6 @@ If you build GCC with @command{gfortran}, @command{gcc} will recognize ...@@ -308,7 +374,6 @@ If you build GCC with @command{gfortran}, @command{gcc} will recognize
command line options. command line options.
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
@c GNU Fortran and G77 @c GNU Fortran and G77
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
...@@ -349,7 +414,6 @@ because it was expected to be easier to maintain code we ...@@ -349,7 +414,6 @@ because it was expected to be easier to maintain code we
develop ourselves than to do a major overhaul of @command{g77} first, develop ourselves than to do a major overhaul of @command{g77} first,
and then build a Fortran 95 compiler out of it. and then build a Fortran 95 compiler out of it.
@include invoke.texi
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
@c Project Status @c Project Status
...@@ -374,14 +438,6 @@ the GCC homepage in March 18, 2000 ...@@ -374,14 +438,6 @@ the GCC homepage in March 18, 2000
(even though Andy had already been working on it for a while, (even though Andy had already been working on it for a while,
of course). of course).
@menu
* Compiler and Library Status::
* Proposed Extensions::
@end menu
@node Compiler and Library Status
@section Compiler and Library Status
The GNU Fortran compiler is able to compile nearly all The GNU Fortran compiler is able to compile nearly all
standard-compliant Fortran 95, Fortran 90, and Fortran 77 programs, standard-compliant Fortran 95, Fortran 90, and Fortran 77 programs,
including a number of standard and non-standard extensions, and can be including a number of standard and non-standard extensions, and can be
...@@ -419,98 +475,39 @@ and the performance of compiled code, and extending the compiler to support ...@@ -419,98 +475,39 @@ and the performance of compiled code, and extending the compiler to support
future standards---in particular, Fortran 2003. future standards---in particular, Fortran 2003.
@node Proposed Extensions @c ---------------------------------------------------------------------
@section Proposed Extensions @c Standards
@c ---------------------------------------------------------------------
Here's a list of proposed extensions for the GNU Fortran compiler, in no particular
order. Most of these are necessary to be fully compatible with
existing Fortran compilers, but they are not part of the official
J3 Fortran 95 standard.
@subsection Compiler extensions:
@itemize @bullet
@item
User-specified alignment rules for structures.
@item
Flag to generate @code{Makefile} info.
@item
Automatically extend single precision constants to double.
@item
Compile code that conserves memory by dynamically allocating common and
module storage either on stack or heap.
@item
Compile flag to generate code for array conformance checking (suggest -CC).
@item
User control of symbol names (underscores, etc).
@item
Compile setting for maximum size of stack frame size before spilling
parts to static or heap.
@item
Flag to force local variables into static space.
@item
Flag to force local variables onto stack.
@item
Flag for maximum errors before ending compile.
@item
Option to initialize otherwise uninitialized integer and floating
point variables.
@end itemize
@subsection Environment Options
@itemize @bullet
@item
Pluggable library modules for random numbers, linear algebra.
LA should use BLAS calling conventions.
@item
Environment variables controlling actions on arithmetic exceptions like
overflow, underflow, precision loss---Generate NaN, abort, default.
action.
@item
Set precision for fp units that support it (i387).
@item
Variable for setting fp rounding mode.
@item
Variable to fill uninitialized variables with a user-defined bit
pattern.
@item @node Standards
Environment variable controlling filename that is opened for that unit @chapter Standards
number. @cindex Standards
@item The GNU Fortran compiler implements
Environment variable to clear/trash memory being freed. ISO/IEC 1539:1997 (Fortran 95). As such, it can also compile essentially all
standard-compliant Fortran 90 and Fortran 77 programs. It also supports
the ISO/IEC TR-15581 enhancements to allocatable arrays, and
the @uref{http://www.openmp.org/drupal/mp-documents/spec25.pdf,
OpenMP Application Program Interface v2.5} specification.
@item In the future, the GNU Fortran compiler may also support other standard
Environment variable to control tracing of allocations and frees. variants of and extensions to the Fortran language. These include
ISO/IEC 1539-1:2004 (Fortran 2003).
@item
Environment variable to display allocated memory at normal program end.
@item @c =====================================================================
Environment variable for filename for * IO-unit. @c PART II: INVOCATION REFERENCE
@c =====================================================================
@item @tex
Environment variable for temporary file directory. \part{II}{Invoking GNU Fortran}
@end tex
@item @c ---------------------------------------------------------------------
Environment variable forcing standard output to be line buffered (unix). @c Compiler Options
@c ---------------------------------------------------------------------
@end itemize @include invoke.texi
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
...@@ -688,6 +685,106 @@ data representation for unformatted files. @xref{Runtime Options}, for ...@@ -688,6 +685,106 @@ data representation for unformatted files. @xref{Runtime Options}, for
setting a default data representation for the whole program. The setting a default data representation for the whole program. The
@code{CONVERT} specifier overrides the @code{-fconvert} compile options. @code{CONVERT} specifier overrides the @code{-fconvert} compile options.
@c =====================================================================
@c PART III: LANGUAGE REFERENCE
@c =====================================================================
@tex
\part{III}{Language Reference}
@end tex
@c ---------------------------------------------------------------------
@c Fortran 2003 Status
@c ---------------------------------------------------------------------
@node Fortran 2003 status
@chapter Fortran 2003 Status
Although GNU Fortran focuses on implementing the Fortran 95
standard for the time being, a few Fortran 2003 features are currently
available.
@itemize
@item
Intrinsics @code{command_argument_count}, @code{get_command},
@code{get_command_argument}, @code{get_environment_variable}, and
@code{move_alloc}.
@item
@cindex Array constructors
@cindex @code{[...]}
Array constructors using square brackets. That is, @code{[...]} rather
than @code{(/.../)}.
@item
@cindex @code{FLUSH} statement
@code{FLUSH} statement.
@item
@cindex @code{IOMSG=} specifier
@code{IOMSG=} specifier for I/O statements.
@item
@cindex @code{ENUM} statement
@cindex @code{ENUMERATOR} statement
@cindex @command{-fshort-enums}
Support for the declaration of enumeration constants via the
@code{ENUM} and @code{ENUMERATOR} statements. Interoperability with
@command{gcc} is guaranteed also for the case where the
@command{-fshort-enums} command line option is given.
@item
@cindex TR 15581
TR 15581:
@itemize
@item
@cindex @code{ALLOCATABLE} dummy arguments
@code{ALLOCATABLE} dummy arguments.
@item
@cindex @code{ALLOCATABLE} function results
@code{ALLOCATABLE} function results
@item
@cindex @code{ALLOCATABLE} components of derived types
@code{ALLOCATABLE} components of derived types
@end itemize
@item
@cindex @code{STREAM} I/O
@cindex @code{ACCESS='STREAM'} I/O
The @code{OPEN} statement supports the @code{ACCESS='STREAM'} specifier,
allowing I/O without any record structure.
@item
Namelist input/output for internal files.
@item
@cindex @code{PROTECTED}
The @code{PROTECTED} statement and attribute.
@item
@cindex @code{VALUE}
The @code{VALUE} statement and attribute.
@item
@cindex @code{VOLATILE}
The @code{VOLATILE} statement and attribute.
@item
@cindex @code{IMPORT}
The @code{IMPORT} statement, allowing to import
host-associated derived types.
@item
@cindex @code{USE, INTRINSIC}
@cindex @code{ISO_FORTRAN_ENV}
@code{USE} statement with @code{INTRINSIC} and @code{NON_INTRINSIC}
attribute; supported intrinsic modules: @code{ISO_FORTRAN_ENV},
@code{OMP_LIB} and @code{OMP_LIB_KINDS}.
@end itemize
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
@c Extensions @c Extensions
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
...@@ -1176,15 +1273,22 @@ For details refer to the actual ...@@ -1176,15 +1273,22 @@ For details refer to the actual
OpenMP Application Program Interface v2.5} specification. OpenMP Application Program Interface v2.5} specification.
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
@include intrinsic.texi @c Intrinsic Procedures
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
@include intrinsic.texi
@tex
\blankpart
@end tex
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
@c Contributing @c Contributing
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
@node Contributing @node Contributing
@chapter Contributing @unnumbered Contributing
@cindex Contributing @cindex Contributing
Free software is only possible if people contribute to efforts Free software is only possible if people contribute to efforts
...@@ -1206,6 +1310,7 @@ but they are also things doable by someone who is willing and able. ...@@ -1206,6 +1310,7 @@ but they are also things doable by someone who is willing and able.
@menu @menu
* Contributors:: * Contributors::
* Projects:: * Projects::
* Proposed Extensions::
@end menu @end menu
...@@ -1300,112 +1405,96 @@ please contact a project maintainer. ...@@ -1300,112 +1405,96 @@ please contact a project maintainer.
@c TODO: email! @c TODO: email!
@c --------------------------------------------------------------------- @node Proposed Extensions
@c Standards @section Proposed Extensions
@c ---------------------------------------------------------------------
@node Standards Here's a list of proposed extensions for the GNU Fortran compiler, in no particular
@chapter Standards order. Most of these are necessary to be fully compatible with
@cindex Standards existing Fortran compilers, but they are not part of the official
J3 Fortran 95 standard.
The GNU Fortran compiler implements @subsection Compiler extensions:
ISO/IEC 1539:1997 (Fortran 95). As such, it can also compile essentially all @itemize @bullet
standard-compliant Fortran 90 and Fortran 77 programs. It also supports @item
the ISO/IEC TR-15581 enhancements to allocatable arrays, and User-specified alignment rules for structures.
the @uref{http://www.openmp.org/drupal/mp-documents/spec25.pdf,
OpenMP Application Program Interface v2.5} specification.
In the future, the GNU Fortran compiler may also support other standard @item
variants of and extensions to the Fortran language. These include Flag to generate @code{Makefile} info.
ISO/IEC 1539-1:2004 (Fortran 2003).
@menu @item
* Fortran 2003 status:: Automatically extend single precision constants to double.
@end menu
@node Fortran 2003 status @item
@section Fortran 2003 status Compile code that conserves memory by dynamically allocating common and
module storage either on stack or heap.
Although GNU Fortran focuses on implementing the Fortran 95 @item
standard for the time being, a few Fortran 2003 features are currently Compile flag to generate code for array conformance checking (suggest -CC).
available.
@itemize @item
@item User control of symbol names (underscores, etc).
Intrinsics @code{command_argument_count}, @code{get_command},
@code{get_command_argument}, @code{get_environment_variable}, and
@code{move_alloc}.
@item @item
@cindex Array constructors Compile setting for maximum size of stack frame size before spilling
@cindex @code{[...]} parts to static or heap.
Array constructors using square brackets. That is, @code{[...]} rather
than @code{(/.../)}.
@item @item
@cindex @code{FLUSH} statement Flag to force local variables into static space.
@code{FLUSH} statement.
@item @item
@cindex @code{IOMSG=} specifier Flag to force local variables onto stack.
@code{IOMSG=} specifier for I/O statements.
@item @item
@cindex @code{ENUM} statement Flag for maximum errors before ending compile.
@cindex @code{ENUMERATOR} statement
@cindex @command{-fshort-enums}
Support for the declaration of enumeration constants via the
@code{ENUM} and @code{ENUMERATOR} statements. Interoperability with
@command{gcc} is guaranteed also for the case where the
@command{-fshort-enums} command line option is given.
@item @item
@cindex TR 15581 Option to initialize otherwise uninitialized integer and floating
TR 15581: point variables.
@itemize @end itemize
@subsection Environment Options
@itemize @bullet
@item @item
@cindex @code{ALLOCATABLE} dummy arguments Pluggable library modules for random numbers, linear algebra.
@code{ALLOCATABLE} dummy arguments. LA should use BLAS calling conventions.
@item @item
@cindex @code{ALLOCATABLE} function results Environment variables controlling actions on arithmetic exceptions like
@code{ALLOCATABLE} function results overflow, underflow, precision loss---Generate NaN, abort, default.
action.
@item @item
@cindex @code{ALLOCATABLE} components of derived types Set precision for fp units that support it (i387).
@code{ALLOCATABLE} components of derived types
@end itemize
@item @item
@cindex @code{STREAM} I/O Variable for setting fp rounding mode.
@cindex @code{ACCESS='STREAM'} I/O
The @code{OPEN} statement supports the @code{ACCESS='STREAM'} specifier,
allowing I/O without any record structure.
@item @item
Namelist input/output for internal files. Variable to fill uninitialized variables with a user-defined bit
pattern.
@item @item
@cindex @code{PROTECTED} Environment variable controlling filename that is opened for that unit
The @code{PROTECTED} statement and attribute. number.
@item @item
@cindex @code{VALUE} Environment variable to clear/trash memory being freed.
The @code{VALUE} statement and attribute.
@item @item
@cindex @code{VOLATILE} Environment variable to control tracing of allocations and frees.
The @code{VOLATILE} statement and attribute.
@item @item
@cindex @code{IMPORT} Environment variable to display allocated memory at normal program end.
The @code{IMPORT} statement, allowing to import
host-associated derived types.
@item @item
@cindex @code{USE, INTRINSIC} Environment variable for filename for * IO-unit.
@cindex @code{ISO_FORTRAN_ENV}
@code{USE} statement with @code{INTRINSIC} and @code{NON_INTRINSIC} @item
attribute; supported intrinsic modules: @code{ISO_FORTRAN_ENV}, Environment variable for temporary file directory.
@code{OMP_LIB} and @code{OMP_LIB_KINDS}.
@item
Environment variable forcing standard output to be line buffered (unix).
@end itemize @end itemize
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment