Commit 7fc15ba5 by Brooks Moses Committed by Brooks Moses

gfortran.texi: Consistently refer to the compiler as "GNU Fortran".

2006-10-04  Brooks Moses  <bmoses@stanford.edu>

	* gfortran.texi: Consistently refer to the compiler as "GNU
	Fortran".
	* intrinsic.texi: Ditto.
	* invoke.texi: Ditto.

From-SVN: r117442
parent 4afc7adf
2006-10-04 Brooks Moses <bmoses@stanford.edu>
* gfortran.texi: Consistently refer to the compiler as "GNU
Fortran".
* intrinsic.texi: Ditto.
* invoke.texi: Ditto.
2006-10-04 Richard Henderson <rth@redhat.com> 2006-10-04 Richard Henderson <rth@redhat.com>
Jakub Jelinek <jakub@redhat.com> Jakub Jelinek <jakub@redhat.com>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
@include gcc-common.texi @include gcc-common.texi
@settitle The GNU Fortran 95 Compiler @settitle The GNU Fortran Compiler
@c Create a separate index for command line options @c Create a separate index for command line options
@defcodeindex op @defcodeindex op
...@@ -63,10 +63,10 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) ...@@ -63,10 +63,10 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
@ifinfo @ifinfo
@dircategory Software development @dircategory Software development
@direntry @direntry
* gfortran: (gfortran). The GNU Fortran 95 Compiler. * gfortran: (gfortran). The GNU Fortran Compiler.
@end direntry @end direntry
This file documents the use and the internals of This file documents the use and the internals of
the GNU Fortran 95 compiler, (@command{gfortran}). the GNU Fortran compiler, (@command{gfortran}).
Published by the Free Software Foundation Published by the Free Software Foundation
51 Franklin Street, Fifth Floor 51 Franklin Street, Fifth Floor
...@@ -78,7 +78,7 @@ Boston, MA 02110-1301 USA ...@@ -78,7 +78,7 @@ Boston, MA 02110-1301 USA
@setchapternewpage odd @setchapternewpage odd
@titlepage @titlepage
@title Using GNU Fortran 95 @title Using GNU Fortran
@sp 2 @sp 2
@center The gfortran team @center The gfortran team
@page @page
...@@ -103,13 +103,13 @@ Boston, MA 02110-1301, USA@* ...@@ -103,13 +103,13 @@ Boston, MA 02110-1301, USA@*
@cindex Introduction @cindex Introduction
This manual documents the use of @command{gfortran}, This manual documents the use of @command{gfortran},
the GNU Fortran 95 compiler. You can find in this manual how to invoke the GNU Fortran compiler. You can find in this manual how to invoke
@command{gfortran}, as well as its features and incompatibilities. @command{gfortran}, as well as its features and incompatibilities.
@ifset DEVELOPMENT @ifset DEVELOPMENT
@emph{Warning:} This document, and the compiler it describes, are still @emph{Warning:} This document, and the compiler it describes, are still
under development. While efforts are made to keep it up-to-date, it might under development. While efforts are made to keep it up-to-date, it might
not accurately reflect the status of the most recent @command{gfortran}. not accurately reflect the status of the most recent GNU Fortran compiler.
@end ifset @end ifset
@comment @comment
...@@ -118,16 +118,16 @@ not accurately reflect the status of the most recent @command{gfortran}. ...@@ -118,16 +118,16 @@ not accurately reflect the status of the most recent @command{gfortran}.
@comment better formatting. @comment better formatting.
@comment @comment
@menu @menu
* Getting Started:: What you should know about @command{gfortran}. * Getting Started:: What you should know about GNU Fortran.
* GFORTRAN and GCC:: You can compile Fortran, C, or other programs. * GNU Fortran and GCC:: You can compile Fortran, C, or other programs.
* GFORTRAN and G77:: Why we chose to start from scratch. * GNU Fortran and G77:: Why we chose to start from scratch.
* Invoking GFORTRAN:: Command options supported by @command{gfortran}. * Invoking GNU Fortran:: Command options supported by @command{gfortran}.
* Project Status:: Status of @command{gfortran}, roadmap, proposed extensions. * Project Status:: Status of GNU Fortran, roadmap, proposed extensions.
* Contributing:: How you can help. * Contributing:: How you can help.
* Standards:: Standards supported by @command{gfortran} * Standards:: Standards supported by GNU Fortran.
* Runtime:: Influencing runtime behavior with environment variables. * Runtime:: Influencing runtime behavior with environment variables.
* Extensions:: Language extensions implemented by @command{gfortran} * Extensions:: Language extensions implemented by GNU Fortran.
* Intrinsic Procedures:: Intrinsic procedures supported by @command{gfortran} * Intrinsic Procedures:: Intrinsic procedures supported by GNU Fortran.
* 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::
...@@ -145,16 +145,16 @@ not accurately reflect the status of the most recent @command{gfortran}. ...@@ -145,16 +145,16 @@ not accurately reflect the status of the most recent @command{gfortran}.
@node Getting Started @node Getting Started
@chapter Getting Started @chapter Getting Started
Gfortran is the GNU Fortran 95 compiler front end, The GNU Fortran compiler front end was
designed initially as a free replacement for, designed initially as a free replacement for,
or alternative to, the unix @command{f95} command; or alternative to, the unix @command{f95} command;
@command{gfortran} is the command you'll use to invoke the compiler. @command{gfortran} is the command you'll use to invoke the compiler.
Gfortran is still in an early state of development. The GNU Fortran compiler is still in an early state of development.
@command{gfortran} can generate code for most constructs and expressions, It can generate code for most constructs and expressions,
but much work remains to be done. but much work remains to be done.
When @command{gfortran} is finished, When the GNU Fortran compiler is finished,
it will do everything you expect from any decent compiler: it will do everything you expect from any decent compiler:
@itemize @bullet @itemize @bullet
...@@ -210,7 +210,7 @@ This machine code is organized into @dfn{modules} and is located ...@@ -210,7 +210,7 @@ This machine code is organized into @dfn{modules} and is located
and @dfn{linked} to the user program. and @dfn{linked} to the user program.
@end itemize @end itemize
Gfortran consists of several components: The GNU Fortran compiler consists of several components:
@itemize @bullet @itemize @bullet
@item @item
...@@ -228,7 +228,7 @@ The @command{gfortran} command itself, ...@@ -228,7 +228,7 @@ The @command{gfortran} command itself,
which also might be installed as the which also might be installed as the
system's @command{f95} command. system's @command{f95} command.
@command{gfortran} is just another driver program, @command{gfortran} is just another driver program,
but specifically for the Fortran 95 compiler only. but specifically for the Fortran compiler only.
The difference with @command{gcc} is that @command{gfortran} The difference with @command{gcc} is that @command{gfortran}
will automatically link the correct libraries to your program. will automatically link the correct libraries to your program.
...@@ -245,7 +245,7 @@ and routines for interaction with files and the operating system. ...@@ -245,7 +245,7 @@ and routines for interaction with files and the operating system.
@item @item
The Fortran compiler itself, (@command{f951}). The Fortran compiler itself, (@command{f951}).
This is the gfortran parser and code generator, This is the GNU Fortran parser and code generator,
linked to and interfaced with the GCC backend library. linked to and interfaced with the GCC backend library.
@command{f951} ``translates'' the source code to @command{f951} ``translates'' the source code to
assembler code. You would typically not use this assembler code. You would typically not use this
...@@ -257,11 +257,11 @@ programs will call it for you. ...@@ -257,11 +257,11 @@ programs will call it for you.
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
@c GFORTRAN and GCC @c GNU Fortran and GCC
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
@node GFORTRAN and GCC @node GNU Fortran and GCC
@chapter GFORTRAN and GCC @chapter GNU Fortran and GCC
@cindex GNU Compiler Collection @cindex GNU Compiler Collection
GCC used to be the GNU ``C'' Compiler, GCC used to be the GNU ``C'' Compiler,
...@@ -294,27 +294,27 @@ handed off too the back end which assembles the program unit. ...@@ -294,27 +294,27 @@ handed off too the back end which assembles the program unit.
Different phases in this translation process can be, Different phases in this translation process can be,
and in fact @emph{are} merged in many compiler front ends. and in fact @emph{are} merged in many compiler front ends.
GNU Fortran 95 has a strict separation between the GNU Fortran has a strict separation between the
parser and code generator. parser and code generator.
The goal of the gfortran project is to build a new front end for GCC. The goal of the GNU Fortran project is to build a new front end for GCC.
Specifically, a Fortran 95 front end. Specifically, a Fortran 95 front end.
In a non-gfortran installation, In a non-@command{gfortran} installation,
@command{gcc} will not be able to compile Fortran 95 source code @command{gcc} will not be able to compile Fortran source code
(only the ``C'' front end has to be compiled if you want to build GCC, (only the ``C'' front end has to be compiled if you want to build GCC,
all other languages are optional). all other languages are optional).
If you build GCC with gfortran, @command{gcc} will recognize If you build GCC with @command{gfortran}, @command{gcc} will recognize
@file{.f/.f90/.f95} source files and accepts Fortran 95 specific @file{.f/.f90/.f95} source files and accepts Fortran specific
command line options. command line options.
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
@c GFORTRAN and G77 @c GNU Fortran and G77
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
@node GFORTRAN and G77 @node GNU Fortran and G77
@chapter GFORTRAN and G77 @chapter GNU Fortran and G77
@cindex Fortran 77 @cindex Fortran 77
@cindex G77 @cindex G77
...@@ -359,10 +359,10 @@ and then build a Fortran 95 compiler out of it. ...@@ -359,10 +359,10 @@ and then build a Fortran 95 compiler out of it.
@chapter Project Status @chapter Project Status
@quotation @quotation
As soon as gfortran can parse all of the statements correctly, As soon as @command{gfortran} can parse all of the statements correctly,
it will be in the ``larva'' state. it will be in the ``larva'' state.
When we generate code, the ``puppa'' state. When we generate code, the ``puppa'' state.
When gfortran is done, When @command{gfortran} is done,
we'll see if it will be a beautiful butterfly, we'll see if it will be a beautiful butterfly,
or just a big bug.... or just a big bug....
...@@ -374,7 +374,8 @@ the GCC homepage in March 18, 2000 ...@@ -374,7 +374,8 @@ 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).
Gfortran is currently reaching the stage where is is able to compile real The GNU Fortran compiler is currently reaching the stage where is is able to
compile real
world programs. However it is still under development and has many rough world programs. However it is still under development and has many rough
edges. edges.
...@@ -389,19 +390,19 @@ edges. ...@@ -389,19 +390,19 @@ edges.
@table @emph @table @emph
@item Front end @item Front end
This is the part of gfortran which parses a source file, verifies that it This is the part of the GNU Fortran compiler which parses a source file, verifies that it
is valid Fortran 95, performs compile time replacement of constants is valid Fortran, performs compile time replacement of constants
(PARAMETER variables) and reads and generate module files. This is (PARAMETER variables) and reads and generate module files. This is
almost complete. Every Fortran 95 source should be accepted, and most almost complete. Every Fortran 95 source should be accepted, and most
none-Fortran 95 source should be rejected. If you find a source file where none-Fortran 95 source should be rejected. If you find a source file where
this is not true, please tell us. You can use the -fsyntax-only switch to this is not true, please tell us. You can use the -fsyntax-only switch to
make gfortran quit after running the front end, effectively reducing it to make @command{gfortran} quit after running the front end, effectively reducing it to
a syntax checker. a syntax checker.
@item Middle end interface @item Middle end interface
These are the parts of gfortran that take the parse tree generated by the These are the parts of GNU Fortran that take the parse tree generated by the
front end and translate it to the GENERIC form required by the GCC back front end and translate it to the GENERIC form required by the GCC back
end. Work is ongoing in these parts of gfortran, but a large part has end. Work is ongoing in these parts of GNU Fortran, but a large part has
already been completed. already been completed.
@end table @end table
...@@ -429,7 +430,7 @@ Array intrinsics mostly work. ...@@ -429,7 +430,7 @@ Array intrinsics mostly work.
@node Proposed Extensions @node Proposed Extensions
@section Proposed Extensions @section Proposed Extensions
Here's a list of proposed extensions for @command{gfortran}, in no particular 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 order. Most of these are necessary to be fully compatible with
existing Fortran compilers, but they are not part of the official existing Fortran compilers, but they are not part of the official
J3 Fortran 95 standard. J3 Fortran 95 standard.
...@@ -601,7 +602,7 @@ error is used. If the first letter is @samp{n}, @samp{N} or ...@@ -601,7 +602,7 @@ error is used. If the first letter is @samp{n}, @samp{N} or
This environment variable controls where scratch files are This environment variable controls where scratch files are
created. If this environment variable is missing, created. If this environment variable is missing,
gfortran searches for the environment variable @env{TMP}. If GNU Fortran searches for the environment variable @env{TMP}. If
this is also missing, the default is @file{/tmp}. this is also missing, the default is @file{/tmp}.
@node GFORTRAN_UNBUFFERED_ALL @node GFORTRAN_UNBUFFERED_ALL
...@@ -648,7 +649,7 @@ be sure to quote spaces, as in ...@@ -648,7 +649,7 @@ be sure to quote spaces, as in
@smallexample @smallexample
$ GFORTRAN_LIST_SEPARATOR=' , ' ./a.out $ GFORTRAN_LIST_SEPARATOR=' , ' ./a.out
@end smallexample @end smallexample
when @code{a.out} is the gfortran program that you want to run. when @code{a.out} is the compiled Fortran program that you want to run.
Default is a single space. Default is a single space.
@node GFORTRAN_CONVERT_UNIT @node GFORTRAN_CONVERT_UNIT
...@@ -726,11 +727,11 @@ setting a default data representation for the whole program. The ...@@ -726,11 +727,11 @@ setting a default data representation for the whole program. The
@chapter Extensions @chapter Extensions
@cindex Extension @cindex Extension
@command{gfortran} implements a number of extensions over standard GNU Fortran implements a number of extensions over standard
Fortran. This chapter contains information on their syntax and Fortran. This chapter contains information on their syntax and
meaning. There are currently two categories of @command{gfortran} meaning. There are currently two categories of GNU Fortran
extensions, those that provide functionality beyond that provided extensions, those that provide functionality beyond that provided
by any standard, and those that are supported by @command{gfortran} by any standard, and those that are supported by GNU Fortran
purely for backward compatibility with legacy compilers. By default, purely for backward compatibility with legacy compilers. By default,
@option{-std=gnu} allows the compiler to accept both types of @option{-std=gnu} allows the compiler to accept both types of
extensions, but to warn about the use of the latter. Specifying extensions, but to warn about the use of the latter. Specifying
...@@ -759,7 +760,7 @@ of extensions, and @option{-std=legacy} allows both without warning. ...@@ -759,7 +760,7 @@ of extensions, and @option{-std=legacy} allows both without warning.
@section Old-style kind specifications @section Old-style kind specifications
@cindex Kind specifications @cindex Kind specifications
@command{gfortran} allows old-style kind specifications in GNU Fortran allows old-style kind specifications in
declarations. These look like: declarations. These look like:
@smallexample @smallexample
TYPESPEC*k x,y,z TYPESPEC*k x,y,z
...@@ -776,7 +777,7 @@ other words, it is equivalent to the standard conforming declaration ...@@ -776,7 +777,7 @@ other words, it is equivalent to the standard conforming declaration
@section Old-style variable initialization @section Old-style variable initialization
@cindex Initialization @cindex Initialization
@command{gfortran} allows old-style initialization of variables of the GNU Fortran allows old-style initialization of variables of the
form: form:
@smallexample @smallexample
INTEGER*4 i/1/,j/2/ INTEGER*4 i/1/,j/2/
...@@ -808,7 +809,7 @@ automatically acquire the @code{SAVE} attribute. ...@@ -808,7 +809,7 @@ automatically acquire the @code{SAVE} attribute.
@section Extensions to namelist @section Extensions to namelist
@cindex Namelist @cindex Namelist
@command{gfortran} fully supports the Fortran 95 standard for namelist I/O GNU Fortran fully supports the Fortran 95 standard for namelist I/O
including array qualifiers, substrings and fully qualified derived types. including array qualifiers, substrings and fully qualified derived types.
The output from a namelist write is compatible with namelist read. The The output from a namelist write is compatible with namelist read. The
output has all names in upper case and indentation to column 1 after the output has all names in upper case and indentation to column 1 after the
...@@ -874,7 +875,7 @@ given the value 0.00 and succeeding elements will be 1.00 and 2.00. ...@@ -874,7 +875,7 @@ given the value 0.00 and succeeding elements will be 1.00 and 2.00.
@section X format descriptor @section X format descriptor
@cindex X format descriptor @cindex X format descriptor
To support legacy codes, @command{gfortran} permits the count field To support legacy codes, GNU Fortran permits the count field
of the X edit descriptor in FORMAT statements to be omitted. When of the X edit descriptor in FORMAT statements to be omitted. When
omitted, the count is implicitly assumed to be one. omitted, the count is implicitly assumed to be one.
...@@ -887,7 +888,7 @@ omitted, the count is implicitly assumed to be one. ...@@ -887,7 +888,7 @@ omitted, the count is implicitly assumed to be one.
@section Commas in FORMAT specifications @section Commas in FORMAT specifications
@cindex Commas in FORMAT specifications @cindex Commas in FORMAT specifications
To support legacy codes, @command{gfortran} allows the comma separator To support legacy codes, GNU Fortran allows the comma separator
to be omitted immediately before and after character string edit to be omitted immediately before and after character string edit
descriptors in FORMAT statements. descriptors in FORMAT statements.
...@@ -901,7 +902,7 @@ descriptors in FORMAT statements. ...@@ -901,7 +902,7 @@ descriptors in FORMAT statements.
@section Missing period in FORMAT specifications @section Missing period in FORMAT specifications
@cindex Missing period in FORMAT specifications @cindex Missing period in FORMAT specifications
To support legacy codes, @command{gfortran} allows missing periods in format To support legacy codes, GNU Fortran allows missing periods in format
specifications if and only if -std=legacy is given on the command line. This specifications if and only if -std=legacy is given on the command line. This
is considered non-conforming code and is discouraged. is considered non-conforming code and is discouraged.
...@@ -915,7 +916,7 @@ is considered non-conforming code and is discouraged. ...@@ -915,7 +916,7 @@ is considered non-conforming code and is discouraged.
@section I/O item lists @section I/O item lists
@cindex I/O item lists @cindex I/O item lists
To support legacy codes, @command{gfortran} allows the input item list To support legacy codes, GNU Fortran allows the input item list
of the READ statement, and the output item lists of the WRITE and PRINT of the READ statement, and the output item lists of the WRITE and PRINT
statements to start with a comma. statements to start with a comma.
...@@ -923,14 +924,14 @@ statements to start with a comma. ...@@ -923,14 +924,14 @@ statements to start with a comma.
@section Hexadecimal constants @section Hexadecimal constants
@cindex Hexadecimal constants @cindex Hexadecimal constants
As a GNU extension, @command{gfortran} allows hexadecimal constants to As an extension, GNU Fortran allows hexadecimal constants to
be specified using the X prefix, in addition to the standard Z prefix. be specified using the X prefix, in addition to the standard Z prefix.
BOZ literal constants can also be specified by adding a suffix to the string. BOZ literal constants can also be specified by adding a suffix to the string.
For example, @code{Z'ABC'} and @code{'ABC'Z} are the same constant. For example, @code{Z'ABC'} and @code{'ABC'Z} are the same constant.
The Fortran standard restricts the appearance of a BOZ literal constant to The Fortran standard restricts the appearance of a BOZ literal constant to
the @code{DATA} statement, and it is expected to be assigned to an the @code{DATA} statement, and it is expected to be assigned to an
@code{INTEGER} variable. @command{gfortran} permits a BOZ to appear @code{INTEGER} variable. GNU Fortran permits a BOZ literal to appear
in any initialization expression as well as assignment statements. in any initialization expression as well as assignment statements.
Attempts to use a BOZ literal constant to do a bitwise initialization of a Attempts to use a BOZ literal constant to do a bitwise initialization of a
...@@ -951,14 +952,14 @@ a workaround for legacy code that initializes integers in this manner. ...@@ -951,14 +952,14 @@ a workaround for legacy code that initializes integers in this manner.
@section Real array indices @section Real array indices
@cindex Real array indices @cindex Real array indices
As a GNU extension, @command{gfortran} allows arrays to be indexed using As an extension, GNU Fortran allows arrays to be indexed using
real types, whose values are implicitly converted to integers. real types, whose values are implicitly converted to integers.
@node Unary operators @node Unary operators
@section Unary operators @section Unary operators
@cindex Unary operators @cindex Unary operators
As a GNU extension, @command{gfortran} allows unary plus and unary As an extension, GNU Fortran allows unary plus and unary
minus operators to appear as the second operand of binary arithmetic minus operators to appear as the second operand of binary arithmetic
operators without the need for parenthesis. operators without the need for parenthesis.
...@@ -970,8 +971,8 @@ operators without the need for parenthesis. ...@@ -970,8 +971,8 @@ operators without the need for parenthesis.
@section Implicitly interconvert LOGICAL and INTEGER @section Implicitly interconvert LOGICAL and INTEGER
@cindex Implicitly interconvert LOGICAL and INTEGER @cindex Implicitly interconvert LOGICAL and INTEGER
As a GNU extension for backwards compatibility with other compilers, As an extension for backwards compatibility with other compilers,
@command{gfortran} allows the implicit conversion of LOGICALs to INTEGERs GNU Fortran allows the implicit conversion of LOGICALs to INTEGERs
and vice versa. When converting from a LOGICAL to an INTEGER, the numeric and vice versa. When converting from a LOGICAL to an INTEGER, the numeric
value of @code{.FALSE.} is zero, and that of @code{.TRUE.} is one. When value of @code{.FALSE.} is zero, and that of @code{.TRUE.} is one. When
converting from INTEGER to LOGICAL, the value zero is interpreted as converting from INTEGER to LOGICAL, the value zero is interpreted as
...@@ -991,7 +992,7 @@ or @samp{h}, and there must be an literal, unsigned, nonzero default integer ...@@ -991,7 +992,7 @@ or @samp{h}, and there must be an literal, unsigned, nonzero default integer
constant indicating the number of characters in the string. Hollerith constants constant indicating the number of characters in the string. Hollerith constants
are stored as byte strings, one character per byte. are stored as byte strings, one character per byte.
@command{gfortran} supports Hollerith constants. They can be used as the right GNU Fortran supports Hollerith constants. They can be used as the right
hands in the @code{DATA} statement and @code{ASSIGN} statement, also as the hands in the @code{DATA} statement and @code{ASSIGN} statement, also as the
arguments. The left hands can be of Integer, Real, Complex and Logical type. arguments. The left hands can be of Integer, Real, Complex and Logical type.
The constant will be padded or truncated to fit the size of left hand. The constant will be padded or truncated to fit the size of left hand.
...@@ -1105,7 +1106,7 @@ and also in any routine where a pointee is used, but any variable with ...@@ -1105,7 +1106,7 @@ and also in any routine where a pointee is used, but any variable with
which it shares storage is not used. Code that violates these rules which it shares storage is not used. Code that violates these rules
may not run as the user intends. This is not a bug in the optimizer; may not run as the user intends. This is not a bug in the optimizer;
any code that violates the aliasing rules is illegal. (Note that this any code that violates the aliasing rules is illegal. (Note that this
is not unique to gfortran; any Fortran compiler that supports Cray is not unique to GNU Fortran; any Fortran compiler that supports Cray
pointers will ``incorrectly'' optimize code with illegal aliasing.) pointers will ``incorrectly'' optimize code with illegal aliasing.)
There are a number of restrictions on the attributes that can be There are a number of restrictions on the attributes that can be
...@@ -1142,7 +1143,7 @@ will not change the base address of the array that was passed. ...@@ -1142,7 +1143,7 @@ will not change the base address of the array that was passed.
@section CONVERT specifier @section CONVERT specifier
@cindex CONVERT specifier @cindex CONVERT specifier
gfortran allows the conversion of unformatted data between little- GNU Fortran allows the conversion of unformatted data between little-
and big-endian representation to facilitate moving of data and big-endian representation to facilitate moving of data
between different systems. The conversion can be indicated with between different systems. The conversion can be indicated with
the @code{CONVERT} specifier on the @code{OPEN} statement. the @code{CONVERT} specifier on the @code{OPEN} statement.
...@@ -1173,8 +1174,8 @@ The value of the conversion can be queried by using ...@@ -1173,8 +1174,8 @@ The value of the conversion can be queried by using
@code{INTEGER} values of all supported kinds and for @code{REAL} @code{INTEGER} values of all supported kinds and for @code{REAL}
on IEEE systems of kinds 4 and 8. Conversion between different on IEEE systems of kinds 4 and 8. Conversion between different
``extended double'' types on different architectures such as ``extended double'' types on different architectures such as
m68k and x86_64, which gfortran m68k and x86_64, which GNU Fortran
supports as @code{REAL(KIND=10)} will probably not work. supports as @code{REAL(KIND=10)}, will probably not work.
@emph{Note that the values specified via the GFORTRAN_CONVERT_UNIT @emph{Note that the values specified via the GFORTRAN_CONVERT_UNIT
environment variable will override the CONVERT specifier in the environment variable will override the CONVERT specifier in the
...@@ -1190,8 +1191,8 @@ portable. ...@@ -1190,8 +1191,8 @@ portable.
@section OpenMP @section OpenMP
@cindex OpenMP @cindex OpenMP
gfortran attempts to be OpenMP Application Program Interface v2.5 GNU Fortran attempts to be OpenMP Application Program Interface v2.5
compatible when invoked with the @code{-fopenmp} option. gfortran compatible when invoked with the @code{-fopenmp} option. GNU Fortran
then generates parallelized code according to the OpenMP directives then generates parallelized code according to the OpenMP directives
used in the source. The OpenMP Fortran runtime library used in the source. The OpenMP Fortran runtime library
routines are provided both in a form of Fortran 90 module named routines are provided both in a form of Fortran 90 module named
...@@ -1219,12 +1220,12 @@ to create it. ...@@ -1219,12 +1220,12 @@ to create it.
We're always in need of more people helping out with ideas We're always in need of more people helping out with ideas
and comments, writing documentation and contributing code. and comments, writing documentation and contributing code.
If you want to contribute to GNU Fortran 95, If you want to contribute to GNU Fortran,
have a look at the long lists of projects you can take on. have a look at the long lists of projects you can take on.
Some of these projects are small, Some of these projects are small,
some of them are large; some of them are large;
some are completely orthogonal to the rest of what is some are completely orthogonal to the rest of what is
happening on @command{gfortran}, happening on GNU Fortran,
but others are ``mainstream'' projects in need of enthusiastic hackers. but others are ``mainstream'' projects in need of enthusiastic hackers.
All of these projects are important! All of these projects are important!
We'll eventually get around to the things here, We'll eventually get around to the things here,
...@@ -1237,7 +1238,7 @@ but they are also things doable by someone who is willing and able. ...@@ -1237,7 +1238,7 @@ but they are also things doable by someone who is willing and able.
@node Contributors @node Contributors
@section Contributors to GNU Fortran 95 @section Contributors to GNU Fortran
@cindex Contributors @cindex Contributors
@cindex Credits @cindex Credits
@cindex Authors @cindex Authors
...@@ -1247,7 +1248,7 @@ also the initiator of the whole project. Thanks Andy! ...@@ -1247,7 +1248,7 @@ also the initiator of the whole project. Thanks Andy!
Most of the interface with GCC was written by @emph{Paul Brook}. Most of the interface with GCC was written by @emph{Paul Brook}.
The following individuals have contributed code and/or The following individuals have contributed code and/or
ideas and significant help to the gfortran project ideas and significant help to the GNU Fortran project
(in no particular order): (in no particular order):
@itemize @minus @itemize @minus
...@@ -1282,7 +1283,7 @@ ideas and significant help to the gfortran project ...@@ -1282,7 +1283,7 @@ ideas and significant help to the gfortran project
The following people have contributed bug reports, The following people have contributed bug reports,
smaller or larger patches, smaller or larger patches,
and much needed feedback and encouragement for the and much needed feedback and encouragement for the
@command{gfortran} project: GNU Fortran project:
@itemize @minus @itemize @minus
@item Erik Schnetter @item Erik Schnetter
...@@ -1291,7 +1292,7 @@ and much needed feedback and encouragement for the ...@@ -1291,7 +1292,7 @@ and much needed feedback and encouragement for the
@end itemize @end itemize
Many other individuals have helped debug, Many other individuals have helped debug,
test and improve @command{gfortran} over the past few years, test and improve the GNU Fortran compiler over the past few years,
and we welcome you to do the same! and we welcome you to do the same!
If you already have done so, If you already have done so,
and you would like to see your name listed in the and you would like to see your name listed in the
...@@ -1335,7 +1336,7 @@ please contact a project maintainer. ...@@ -1335,7 +1336,7 @@ please contact a project maintainer.
@chapter Standards @chapter Standards
@cindex Standards @cindex Standards
The GNU Fortran 95 Compiler aims to be a conforming implementation of The GNU Fortran compiler aims to be a conforming implementation of
ISO/IEC 1539:1997 (Fortran 95). ISO/IEC 1539:1997 (Fortran 95).
In the future it may also support other variants of and extensions to In the future it may also support other variants of and extensions to
...@@ -1349,7 +1350,7 @@ ISO Fortran 2003 and OpenMP. ...@@ -1349,7 +1350,7 @@ ISO Fortran 2003 and OpenMP.
@node Fortran 2003 status @node Fortran 2003 status
@section Fortran 2003 status @section Fortran 2003 status
Although @command{gfortran} focuses on implementing the Fortran 95 Although GNU Fortran focuses on implementing the Fortran 95
standard for the time being, a few Fortran 2003 features are currently standard for the time being, a few Fortran 2003 features are currently
available. available.
......
@ignore @ignore
Copyright (C) 2005, 2006 Copyright (C) 2005, 2006
Free Software Foundation, Inc. Free Software Foundation, Inc.
This is part of the GFORTRAN manual. This is part of the GNU Fortran manual.
For copying conditions, see the file gfortran.texi. For copying conditions, see the file gfortran.texi.
Permission is granted to copy, distribute and/or modify this document Permission is granted to copy, distribute and/or modify this document
...@@ -247,7 +247,7 @@ Some intrinsics have documentation yet to be completed as indicated by 'document ...@@ -247,7 +247,7 @@ Some intrinsics have documentation yet to be completed as indicated by 'document
@node Introduction @node Introduction
@section Introduction to intrinsic procedures @section Introduction to intrinsic procedures
Gfortran provides a rich set of intrinsic procedures that includes all GNU Fortran provides a rich set of intrinsic procedures that includes all
the intrinsic procedures required by the Fortran 95 standard, a set of the intrinsic procedures required by the Fortran 95 standard, a set of
intrinsic procedures for backwards compatibility with Gnu Fortran 77 intrinsic procedures for backwards compatibility with Gnu Fortran 77
(i.e., @command{g77}), and a small selection of intrinsic procedures (i.e., @command{g77}), and a small selection of intrinsic procedures
...@@ -256,7 +256,7 @@ description in either the Fortran 95 standard or the Fortran 2003 standard, ...@@ -256,7 +256,7 @@ description in either the Fortran 95 standard or the Fortran 2003 standard,
is unintentional and the standard(s) should be considered authoritative. is unintentional and the standard(s) should be considered authoritative.
The enumeration of the @code{KIND} type parameter is processor defined in The enumeration of the @code{KIND} type parameter is processor defined in
the Fortran 95 standard. Gfortran defines the default integer type and the Fortran 95 standard. GNU Fortran defines the default integer type and
default real type by @code{INTEGER(KIND=4)} and @code{REAL(KIND=4)}, default real type by @code{INTEGER(KIND=4)} and @code{REAL(KIND=4)},
respectively. The standard mandates that both data types shall have respectively. The standard mandates that both data types shall have
another kind, which have more precision. On typical target architectures another kind, which have more precision. On typical target architectures
...@@ -272,7 +272,7 @@ Many of the intrinsics procedures take one or more optional arguments. ...@@ -272,7 +272,7 @@ Many of the intrinsics procedures take one or more optional arguments.
This document follows the convention used in the Fortran 95 standard, This document follows the convention used in the Fortran 95 standard,
and denotes such arguments by square brackets. and denotes such arguments by square brackets.
@command{Gfortran} offers the @option{-std=f95} and @option{-std=gnu} options, GNU Fortran offers the @option{-std=f95} and @option{-std=gnu} options,
which can be used to restrict the set of intrinsic procedures to a which can be used to restrict the set of intrinsic procedures to a
given standard. By default, @command{gfortran} sets the @option{-std=gnu} given standard. By default, @command{gfortran} sets the @option{-std=gnu}
option, and so all intrinsic procedures described here are accepted. There option, and so all intrinsic procedures described here are accepted. There
...@@ -386,7 +386,7 @@ end program test_abs ...@@ -386,7 +386,7 @@ end program test_abs
@findex @code{ACCESS} @findex @code{ACCESS}
@cindex file system functions @cindex file system functions
Not yet implemented in gfortran. Not yet implemented in GNU Fortran.
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
...@@ -1867,7 +1867,7 @@ END PROGRAM ...@@ -1867,7 +1867,7 @@ END PROGRAM
@findex @code{CHMOD} @findex @code{CHMOD}
@cindex file system functions @cindex file system functions
Not yet implemented in gfortran. Not yet implemented in GNU Fortran.
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
...@@ -3343,7 +3343,7 @@ formatted output. Stream I/O should not be mixed with normal record-oriented ...@@ -3343,7 +3343,7 @@ formatted output. Stream I/O should not be mixed with normal record-oriented
(formatted or unformatted) I/O on the same unit; the results are unpredictable. (formatted or unformatted) I/O on the same unit; the results are unpredictable.
This intrinsic routine is provided for backwards compatibility with This intrinsic routine is provided for backwards compatibility with
GNU Fortran 77. @command{Gfortran} provides the Fortran 2003 Stream facility. @command{g77}. GNU Fortran provides the Fortran 2003 Stream facility.
Programmers should consider the use of new stream IO feature in new code Programmers should consider the use of new stream IO feature in new code
for future portability. See also @ref{Fortran 2003 status}. for future portability. See also @ref{Fortran 2003 status}.
...@@ -3398,7 +3398,7 @@ Stream I/O should not be mixed with normal record-oriented (formatted or ...@@ -3398,7 +3398,7 @@ Stream I/O should not be mixed with normal record-oriented (formatted or
unformatted) I/O on the same unit; the results are unpredictable. unformatted) I/O on the same unit; the results are unpredictable.
This intrinsic routine is provided for backwards compatibility with This intrinsic routine is provided for backwards compatibility with
GNU Fortran 77. @command{Gfortran} provides the Fortran 2003 Stream facility. @command{g77}. GNU Fortran provides the Fortran 2003 Stream facility.
Programmers should consider the use of new stream IO feature in new code Programmers should consider the use of new stream IO feature in new code
for future portability. See also @ref{Fortran 2003 status}. for future portability. See also @ref{Fortran 2003 status}.
...@@ -3571,7 +3571,7 @@ formatted output. Stream I/O should not be mixed with normal record-oriented ...@@ -3571,7 +3571,7 @@ formatted output. Stream I/O should not be mixed with normal record-oriented
(formatted or unformatted) I/O on the same unit; the results are unpredictable. (formatted or unformatted) I/O on the same unit; the results are unpredictable.
This intrinsic routine is provided for backwards compatibility with This intrinsic routine is provided for backwards compatibility with
GNU Fortran 77. @command{Gfortran} provides the Fortran 2003 Stream facility. @command{g77}. GNU Fortran provides the Fortran 2003 Stream facility.
Programmers should consider the use of new stream IO feature in new code Programmers should consider the use of new stream IO feature in new code
for future portability. See also @ref{Fortran 2003 status}. for future portability. See also @ref{Fortran 2003 status}.
...@@ -3621,7 +3621,7 @@ output. Stream I/O should not be mixed with normal record-oriented ...@@ -3621,7 +3621,7 @@ output. Stream I/O should not be mixed with normal record-oriented
(formatted or unformatted) I/O on the same unit; the results are unpredictable. (formatted or unformatted) I/O on the same unit; the results are unpredictable.
This intrinsic routine is provided for backwards compatibility with This intrinsic routine is provided for backwards compatibility with
GNU Fortran 77. @command{Gfortran} provides the Fortran 2003 Stream facility. @command{g77}. GNU Fortran provides the Fortran 2003 Stream facility.
Programmers should consider the use of new stream IO feature in new code Programmers should consider the use of new stream IO feature in new code
for future portability. See also @ref{Fortran 2003 status}. for future portability. See also @ref{Fortran 2003 status}.
...@@ -3713,7 +3713,7 @@ end program test_fraction ...@@ -3713,7 +3713,7 @@ end program test_fraction
@item @emph{Description}: @item @emph{Description}:
Frees memory previously allocated by @code{MALLOC()}. The @code{FREE} Frees memory previously allocated by @code{MALLOC()}. The @code{FREE}
intrinsic is an extension intended to be used with Cray pointers, and is intrinsic is an extension intended to be used with Cray pointers, and is
provided in @command{gfortran} to allow user to compile legacy code. For provided in GNU Fortran to allow user to compile legacy code. For
new code using Fortran 95 pointers, the memory de-allocation intrinsic is new code using Fortran 95 pointers, the memory de-allocation intrinsic is
@code{DEALLOCATE}. @code{DEALLOCATE}.
...@@ -3773,7 +3773,7 @@ GNU extension ...@@ -3773,7 +3773,7 @@ GNU extension
@findex @code{FSEEK} @findex @code{FSEEK}
@cindex file system functions @cindex file system functions
Not yet implemented in gfortran. Not yet implemented in GNU Fortran.
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
...@@ -4111,7 +4111,7 @@ See @code{GETPID} for an example. ...@@ -4111,7 +4111,7 @@ See @code{GETPID} for an example.
@findex @code{GMTIME} @findex @code{GMTIME}
@cindex time function @cindex time function
Not yet implemented in gfortran. Not yet implemented in GNU Fortran.
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
...@@ -5280,7 +5280,7 @@ Elemental function ...@@ -5280,7 +5280,7 @@ Elemental function
@findex @code{LSHIFT} @findex @code{LSHIFT}
@cindex bit manipulation @cindex bit manipulation
Not yet implemented in gfortran. Not yet implemented in GNU Fortran.
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
...@@ -5308,7 +5308,7 @@ Function ...@@ -5308,7 +5308,7 @@ Function
@findex @code{LTIME} @findex @code{LTIME}
@cindex time function @cindex time function
Not yet implemented in gfortran. Not yet implemented in GNU Fortran.
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
...@@ -5341,7 +5341,7 @@ Subroutine ...@@ -5341,7 +5341,7 @@ Subroutine
@code{MALLOC(SIZE)} allocates @var{SIZE} bytes of dynamic memory and @code{MALLOC(SIZE)} allocates @var{SIZE} bytes of dynamic memory and
returns the address of the allocated memory. The @code{MALLOC} intrinsic returns the address of the allocated memory. The @code{MALLOC} intrinsic
is an extension intended to be used with Cray pointers, and is provided is an extension intended to be used with Cray pointers, and is provided
in @command{gfortran} to allow user to compile legacy code. For new code in GNU Fortran to allow the user to compile legacy code. For new code
using Fortran 95 pointers, the memory allocation intrinsic is using Fortran 95 pointers, the memory allocation intrinsic is
@code{ALLOCATE}. @code{ALLOCATE}.
...@@ -6549,7 +6549,7 @@ The value returned is equal to ...@@ -6549,7 +6549,7 @@ The value returned is equal to
@findex @code{RSHIFT} @findex @code{RSHIFT}
@cindex bit manipulation @cindex bit manipulation
Not yet implemented in gfortran. Not yet implemented in GNU Fortran.
@table @asis @table @asis
@item @emph{Description}: @item @emph{Description}:
...@@ -7273,7 +7273,7 @@ See @code{RAND} and @code{IRAND} for examples. ...@@ -7273,7 +7273,7 @@ See @code{RAND} and @code{IRAND} for examples.
The Fortran 2003 standard specifies the intrinsic @code{RANDOM_SEED} to The Fortran 2003 standard specifies the intrinsic @code{RANDOM_SEED} to
initialize the pseudo-random numbers generator and @code{RANDOM_NUMBER} initialize the pseudo-random numbers generator and @code{RANDOM_NUMBER}
to generate pseudo-random numbers. Please note that in to generate pseudo-random numbers. Please note that in
@command{gfortran}, these two sets of intrinsics (@code{RAND}, GNU Fortran, these two sets of intrinsics (@code{RAND},
@code{IRAND} and @code{SRAND} on the one hand, @code{RANDOM_NUMBER} and @code{IRAND} and @code{SRAND} on the one hand, @code{RANDOM_NUMBER} and
@code{RANDOM_SEED} on the other hand) access two independent @code{RANDOM_SEED} on the other hand) access two independent
pseudo-random number generators. pseudo-random number generators.
......
@c Copyright (C) 2004, 2005, 2006 @c Copyright (C) 2004, 2005, 2006
@c Free Software Foundation, Inc. @c Free Software Foundation, Inc.
@c This is part of the GFORTRAN manual. @c This is part of the GNU Fortran manual.
@c For copying conditions, see the file gfortran.texi. @c For copying conditions, see the file gfortran.texi.
@ignore @ignore
...@@ -28,7 +28,7 @@ included in the gfdl(7) man page. ...@@ -28,7 +28,7 @@ included in the gfdl(7) man page.
@c man end @c man end
@c Set file name and title for the man page. @c Set file name and title for the man page.
@setfilename gfortran @setfilename gfortran
@settitle GNU Fortran 95 compiler. @settitle GNU Fortran compiler.
@c man begin SYNOPSIS @c man begin SYNOPSIS
gfortran [@option{-c}|@option{-S}|@option{-E}] gfortran [@option{-c}|@option{-S}|@option{-E}]
[@option{-g}] [@option{-pg}] [@option{-O}@var{level}] [@option{-g}] [@option{-pg}] [@option{-O}@var{level}]
...@@ -54,20 +54,20 @@ For instructions on reporting bugs, see ...@@ -54,20 +54,20 @@ For instructions on reporting bugs, see
@c man end @c man end
@c man begin AUTHOR @c man begin AUTHOR
See the Info entry for @command{gfortran} for contributors to GCC and See the Info entry for @command{gfortran} for contributors to GCC and
GFORTRAN@. GNU Fortran.
@c man end @c man end
@end ignore @end ignore
@node Invoking GFORTRAN @node Invoking GNU Fortran
@chapter GNU Fortran 95 Command Options @chapter GNU Fortran Command Options
@cindex GNU Fortran 95 command options @cindex GNU Fortran command options
@cindex command options @cindex command options
@cindex options, GNU Fortran 95 command @cindex options, @command{gfortran} command
@c man begin DESCRIPTION @c man begin DESCRIPTION
The @command{gfortran} command supports all the options supported by the The @command{gfortran} command supports all the options supported by the
@command{gcc} command. Only options specific to gfortran are documented here. @command{gcc} command. Only options specific to GNU Fortran are documented here.
@xref{Invoking GCC,,GCC Command Options,gcc,Using the GNU Compiler @xref{Invoking GCC,,GCC Command Options,gcc,Using the GNU Compiler
Collection (GCC)}, for information Collection (GCC)}, for information
...@@ -76,12 +76,12 @@ therefore, the @command{gfortran} command). ...@@ -76,12 +76,12 @@ therefore, the @command{gfortran} command).
@cindex options, negative forms @cindex options, negative forms
@cindex negative forms of options @cindex negative forms of options
All @command{gcc} and @command{gfortran} options All GCC and GNU Fortran options
are accepted both by @command{gfortran} and by @command{gcc} are accepted both by @command{gfortran} and by @command{gcc}
(as well as any other drivers built at the same time, (as well as any other drivers built at the same time,
such as @command{g++}), such as @command{g++}),
since adding @command{gfortran} to the @command{gcc} distribution since adding GNU Fortran to the GCC distribution
enables acceptance of @command{gfortran} options enables acceptance of GNU Fortran options
by all of the relevant drivers. by all of the relevant drivers.
In some cases, options have positive and negative forms; In some cases, options have positive and negative forms;
...@@ -101,7 +101,7 @@ one is not the default. ...@@ -101,7 +101,7 @@ one is not the default.
* Runtime Options:: Influencing runtime behavior * Runtime Options:: Influencing runtime behavior
* Code Gen Options:: Specifying conventions for function calls, data layout * Code Gen Options:: Specifying conventions for function calls, data layout
and register usage. and register usage.
* Environment Variables:: Env vars that affect GNU Fortran. * Environment Variables:: Env vars that affect @command{gfortran}.
@end menu @end menu
@node Option Summary @node Option Summary
...@@ -197,7 +197,7 @@ form is determined by the file extension. ...@@ -197,7 +197,7 @@ form is determined by the file extension.
Accept all of the intrinsic procedures provided in libgfortran Accept all of the intrinsic procedures provided in libgfortran
without regard to the setting of @option{-std}. In particular, without regard to the setting of @option{-std}. In particular,
this option can be quite useful with @option{-std=f95}. Additionally, this option can be quite useful with @option{-std=f95}. Additionally,
gfortran will ignore @option{-Wnonstd-intrinsics}. @command{gfortran} will ignore @option{-Wnonstd-intrinsics}.
@cindex option, -fd-lines-as-code @cindex option, -fd-lines-as-code
@cindex -fd-lines-as-code, option @cindex -fd-lines-as-code, option
...@@ -315,7 +315,7 @@ in. ...@@ -315,7 +315,7 @@ in.
@cindex options, -frange-check @cindex options, -frange-check
@item -frange-check @item -frange-check
Enable range checking on results of simplification of constant expressions Enable range checking on results of simplification of constant expressions
during compilation. For example, by default, @command{gfortran} will give during compilation. For example, by default, GNU Fortran will give
an overflow error at compile time when simplifying @code{a = EXP(1000)}. an overflow error at compile time when simplifying @code{a = EXP(1000)}.
With @samp{-fno-range-check}, no error will be given and the variable @code{a} With @samp{-fno-range-check}, no error will be given and the variable @code{a}
will be assigned the value @code{+Infinity}. Similarly, will be assigned the value @code{+Infinity}. Similarly,
...@@ -366,12 +366,12 @@ Check the code for syntax errors, but don't do anything beyond that. ...@@ -366,12 +366,12 @@ Check the code for syntax errors, but don't do anything beyond that.
@cindex -pedantic option @cindex -pedantic option
@cindex options, -pedantic @cindex options, -pedantic
@item -pedantic @item -pedantic
Issue warnings for uses of extensions to FORTRAN 95. Issue warnings for uses of extensions to Fortran 95.
@option{-pedantic} also applies to C-language constructs where they @option{-pedantic} also applies to C-language constructs where they
occur in GNU Fortran source files, such as use of @samp{\e} in a occur in GNU Fortran source files, such as use of @samp{\e} in a
character constant within a directive like @samp{#include}. character constant within a directive like @samp{#include}.
Valid FORTRAN 95 programs should compile properly with or without Valid Fortran 95 programs should compile properly with or without
this option. this option.
However, without this option, certain GNU extensions and traditional However, without this option, certain GNU extensions and traditional
Fortran features are supported as well. Fortran features are supported as well.
...@@ -380,7 +380,7 @@ With this option, many of them are rejected. ...@@ -380,7 +380,7 @@ With this option, many of them are rejected.
Some users try to use @option{-pedantic} to check programs for conformance. Some users try to use @option{-pedantic} to check programs for conformance.
They soon find that it does not do quite what they want---it finds some They soon find that it does not do quite what they want---it finds some
nonstandard practices, but not all. nonstandard practices, but not all.
However, improvements to @command{gfortran} in this area are welcome. However, improvements to GNU Fortran in this area are welcome.
This should be used in conjunction with -std=@var{std}. This should be used in conjunction with -std=@var{std}.
...@@ -438,7 +438,7 @@ The following example will trigger the warning. ...@@ -438,7 +438,7 @@ The following example will trigger the warning.
Warn about missing ampersand in continued character constants. The warning is Warn about missing ampersand in continued character constants. The warning is
given with @option{-Wampersand}, @option{-pedantic}, @option{-std=f95}, and given with @option{-Wampersand}, @option{-pedantic}, @option{-std=f95}, and
@option{-std=f2003}. Note: With no ampersand given in a continued character @option{-std=f2003}. Note: With no ampersand given in a continued character
constant, gfortran assumes continuation at the first non-comment, constant, GNU Fortran assumes continuation at the first non-comment,
non-whitespace character after the ampersand that initiated the continuation. non-whitespace character after the ampersand that initiated the continuation.
...@@ -522,7 +522,7 @@ Turns all warnings into errors. ...@@ -522,7 +522,7 @@ Turns all warnings into errors.
@cindex warnings, extra @cindex warnings, extra
Turns on ``extra warnings'' and, if optimization is specified Turns on ``extra warnings'' and, if optimization is specified
via @option{-O}, the @option{-Wuninitialized} option. via @option{-O}, the @option{-Wuninitialized} option.
(This might change in future versions of @command{gfortran} (This might change in future versions of GNU Fortran.)
@end table @end table
@xref{Warning Options,,Options to Request or Suppress Warnings, @xref{Warning Options,,Options to Request or Suppress Warnings,
...@@ -538,14 +538,14 @@ Some of these have no effect when compiling programs written in Fortran. ...@@ -538,14 +538,14 @@ Some of these have no effect when compiling programs written in Fortran.
@cindex debugging information options @cindex debugging information options
GNU Fortran has various special options that are used for debugging GNU Fortran has various special options that are used for debugging
either your program or @command{gfortran} either your program or the GNU Fortran compiler.
@table @gcctabopt @table @gcctabopt
@cindex -fdump-parse-tree option @cindex -fdump-parse-tree option
@cindex option, -fdump-parse-tree @cindex option, -fdump-parse-tree
@item -fdump-parse-tree @item -fdump-parse-tree
Output the internal parse tree before starting code generation. Only Output the internal parse tree before starting code generation. Only
really useful for debugging gfortran itself. really useful for debugging the GNU Fortran compiler itself.
@end table @end table
@table @gcctabopt @table @gcctabopt
...@@ -576,7 +576,7 @@ debugging options. ...@@ -576,7 +576,7 @@ debugging options.
@cindex INCLUDE directive @cindex INCLUDE directive
@cindex directive, INCLUDE @cindex directive, INCLUDE
These options affect how @command{gfortran} searches These options affect how GNU Fortran searches
for files specified by the @code{INCLUDE} directive and where it searches for files specified by the @code{INCLUDE} directive and where it searches
for previously compiled modules. for previously compiled modules.
...@@ -626,7 +626,7 @@ GCC options. ...@@ -626,7 +626,7 @@ GCC options.
@section Influencing runtime behavior @section Influencing runtime behavior
@cindex runtime, options @cindex runtime, options
These options affect the runtime behavior of @command{gfortran}. These options affect the runtime behavior of programs compiled with GNU Fortran.
@table @gcctabopt @table @gcctabopt
@cindex -fconvert=@var{conversion} option @cindex -fconvert=@var{conversion} option
@item -fconvert=@var{conversion} @item -fconvert=@var{conversion}
...@@ -723,18 +723,18 @@ the library implementations use the @command{-fno-f2c} calling conventions. ...@@ -723,18 +723,18 @@ the library implementations use the @command{-fno-f2c} calling conventions.
Do not transform names of entities specified in the Fortran Do not transform names of entities specified in the Fortran
source file by appending underscores to them. source file by appending underscores to them.
With @option{-funderscoring} in effect, @command{gfortran} appends one With @option{-funderscoring} in effect, GNU Fortran appends one
underscore to external names with no underscores. This is done to ensure underscore to external names with no underscores. This is done to ensure
compatibility with code produced by many UNIX Fortran compilers. compatibility with code produced by many UNIX Fortran compilers.
@emph{Caution}: The default behavior of @command{gfortran} is @emph{Caution}: The default behavior of GNU Fortran is
incompatible with @command{f2c} and @command{g77}, please use the incompatible with @command{f2c} and @command{g77}, please use the
@option{-ff2c} option if you want object files compiled with @option{-ff2c} option if you want object files compiled with
@option{gfortran} to be compatible with object code created with these GNU Fortran to be compatible with object code created with these
tools. tools.
Use of @option{-fno-underscoring} is not recommended unless you are Use of @option{-fno-underscoring} is not recommended unless you are
experimenting with issues such as integration of (GNU) Fortran into experimenting with issues such as integration of GNU Fortran into
existing system environments (vis-a-vis existing libraries, tools, and existing system environments (vis-a-vis existing libraries, tools, and
so on). so on).
...@@ -761,13 +761,13 @@ i = j() + max_count(&my_var, &lvar); ...@@ -761,13 +761,13 @@ i = j() + max_count(&my_var, &lvar);
@end smallexample @end smallexample
Use of @option{-fno-underscoring} allows direct specification of Use of @option{-fno-underscoring} allows direct specification of
user-defined names while debugging and when interfacing @command{gfortran} user-defined names while debugging and when interfacing GNU Fortran
code with other languages. code with other languages.
Note that just because the names match does @emph{not} mean that the Note that just because the names match does @emph{not} mean that the
interface implemented by @command{gfortran} for an external name matches the interface implemented by GNU Fortran for an external name matches the
interface implemented by some other language for that same name. interface implemented by some other language for that same name.
That is, getting code produced by @command{gfortran} to link to code produced That is, getting code produced by GNU Fortran to link to code produced
by some other compiler using this or any other method can be only a by some other compiler using this or any other method can be only a
small part of the overall solution---getting the code generated by small part of the overall solution---getting the code generated by
both compilers to agree on issues other than naming can require both compilers to agree on issues other than naming can require
...@@ -781,7 +781,7 @@ could make finding unresolved-reference bugs quite difficult in some ...@@ -781,7 +781,7 @@ could make finding unresolved-reference bugs quite difficult in some
cases---they might occur at program run time, and show up only as cases---they might occur at program run time, and show up only as
buggy behavior at run time. buggy behavior at run time.
In future versions of @command{gfortran} we hope to improve naming and linking In future versions of GNU Fortran we hope to improve naming and linking
issues so that debugging always involves using the names as they appear issues so that debugging always involves using the names as they appear
in the source, even if the names as seen by the linker are mangled to in the source, even if the names as seen by the linker are mangled to
prevent accidental linking between procedures with incompatible prevent accidental linking between procedures with incompatible
...@@ -797,10 +797,10 @@ interfaces. ...@@ -797,10 +797,10 @@ interfaces.
@cindex @command{f2c} calling convention @cindex @command{f2c} calling convention
@cindex @command{g77} calling convention @cindex @command{g77} calling convention
@cindex libf2c calling convention @cindex libf2c calling convention
By default, @command{gfortran} appends an underscore to external By default, GNU Fortran appends an underscore to external
names. If this option is used @command{gfortran} appends two names. If this option is used GNU Fortran appends two
underscores to names with underscores and one underscore to external names underscores to names with underscores and one underscore to external names
with no underscores. (@command{gfortran} also appends two underscores to with no underscores. GNU Fortran also appends two underscores to
internal names with underscores to avoid naming collisions with external internal names with underscores to avoid naming collisions with external
names. names.
...@@ -838,21 +838,21 @@ on the stack. ...@@ -838,21 +838,21 @@ on the stack.
This option currently only affects local arrays declared with constant This option currently only affects local arrays declared with constant
bounds, and may not apply to all character variables. bounds, and may not apply to all character variables.
Future versions of @command{gfortran} may improve this behavior. Future versions of GNU Fortran may improve this behavior.
The default value for @var{n} is 32768. The default value for @var{n} is 32768.
@cindex -fpack-derived @cindex -fpack-derived
@item -fpack-derived @item -fpack-derived
@cindex Structure packing @cindex Structure packing
This option tells gfortran to pack derived type members as closely as This option tells GNU Fortran to pack derived type members as closely as
possible. Code compiled with this option is likely to be incompatible possible. Code compiled with this option is likely to be incompatible
with code compiled without this option, and may execute slower. with code compiled without this option, and may execute slower.
@cindex -frepack-arrays option @cindex -frepack-arrays option
@item -frepack-arrays @item -frepack-arrays
@cindex Repacking arrays @cindex Repacking arrays
In some circumstances @command{gfortran} may pass assumed shape array In some circumstances GNU Fortran may pass assumed shape array
sections via a descriptor describing a discontiguous area of memory. sections via a descriptor describing a discontiguous area of memory.
This option adds code to the function prologue to repack the data into This option adds code to the function prologue to repack the data into
a contiguous block at runtime. a contiguous block at runtime.
...@@ -865,25 +865,25 @@ is discontiguous. ...@@ -865,25 +865,25 @@ is discontiguous.
@item -fshort-enums @item -fshort-enums
This option is provided for interoperability with C code that was This option is provided for interoperability with C code that was
compiled with the @command{-fshort-enums} option. It will make compiled with the @command{-fshort-enums} option. It will make
@command{gfortran} choose the smallest @code{INTEGER} kind a given GNU Fortran choose the smallest @code{INTEGER} kind a given
enumerator set will fit in, and give all its enumerators this kind. enumerator set will fit in, and give all its enumerators this kind.
@end table @end table
@xref{Code Gen Options,,Options for Code Generation Conventions, @xref{Code Gen Options,,Options for Code Generation Conventions,
gcc,Using the GNU Compiler Collection (GCC)}, for information on more options gcc,Using the GNU Compiler Collection (GCC)}, for information on more options
offered by the GBE offered by the GBE
shared by @command{gfortran} @command{gcc} and other GNU compilers. shared by @command{gfortran}, @command{gcc}, and other GNU compilers.
@c man end @c man end
@node Environment Variables @node Environment Variables
@section Environment Variables Affecting GNU Fortran @section Environment Variables Affecting @command{gfortran}
@cindex environment variables @cindex environment variables
@c man begin ENVIRONMENT @c man begin ENVIRONMENT
GNU Fortran 95 currently does not make use of any environment The @command{gfortran} compiler currently does not make use of any environment
variables to control its operation above and beyond those variables to control its operation above and beyond those
that affect the operation of @command{gcc}. that affect the operation of @command{gcc}.
...@@ -892,5 +892,5 @@ gcc,Using the GNU Compiler Collection (GCC)}, for information on environment ...@@ -892,5 +892,5 @@ gcc,Using the GNU Compiler Collection (GCC)}, for information on environment
variables. variables.
@xref{Runtime}, for environment variables that affect the @xref{Runtime}, for environment variables that affect the
run-time behavior of @command{gfortran} programs. run-time behavior of programs compiled with GNU Fortran.
@c man end @c man end
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