for unformatted files.
@item @code{BIG_ENDIAN} Use the big-endian format for unformatted files.
@end itemize
-For POWER systems which support @option{-mabi=ieeelongdouble},
+For POWER systems that support @option{-mabi=ieeelongdouble},
there are additional options, which can be combined with the
others with commas. Those are
@itemize @w{}
@chapter Compiler Characteristics
This chapter describes certain characteristics of the GNU Fortran
-compiler, that are not specified by the Fortran standard, but which
+compiler that are not specified by the Fortran standard, but which
might in some way or another become visible to the programmer.
@menu
Asynchronous I/O is supported if the program is linked against the
POSIX thread library. If that is not the case, all I/O is performed
-as synchronous. On systems which do not support pthread condition
+as synchronous. On systems that do not support pthread condition
variables, such as AIX, I/O is also performed as synchronous.
On some systems, such as Darwin or Solaris, the POSIX thread library
DATA i/1/, j/2/, x/3*0.,1./
@end smallexample
-Note that variables which are explicitly initialized in declarations
+Note that variables that are explicitly initialized in declarations
or in @code{DATA} statements automatically acquire the @code{SAVE}
attribute.
@item @code{CONVERT='BIG_ENDIAN'} Use the big-endian representation for
unformatted files.
@end itemize
-On POWER systems which support @option{-mabi=ieeelongdouble},
+On POWER systems that support @option{-mabi=ieeelongdouble},
there are additional options, which can be combined with the others
with commas. Those are
@itemize @w{}
Otherwise they may contain no specifiers.
@item Structures may contain a special field with the name @code{%FILL}.
-This creates an anonymous component which cannot be accessed but occupies
+This creates an anonymous component that cannot be accessed but occupies
space just as if a component of the same type was declared in its place, useful
for alignment purposes. As an example, the following structure consists
of at least sixteen bytes:
@subsection Variable @code{FORMAT} expressions
@cindex @code{FORMAT}
-A variable @code{FORMAT} expression is format statement which includes
+A variable @code{FORMAT} expression is format statement that includes
angle brackets enclosing a Fortran expression: @code{FORMAT(I<N>)}. GNU
Fortran does not support this legacy extension. The effect of variable
format expressions can be reproduced by using the more powerful (and
@section Experimental features future Fortran versions
@cindex Future Fortran versions
-GNU Fortran supports some experimental features which have been
+GNU Fortran supports some experimental features that have been
proposed and accepted by the J3 standards committee. These
exist to give users a chance to try them out, and to provide
a reference implementation.
Unsigned numbers can be read and written using list-directed,
formatted and unformatted I/O. For formatted I/O, the @samp{B},
@samp{I}, @samp{O} and @samp{Z} descriptors are valid. Negative
-values and values which would overflow are rejected with
+values and values that would overflow are rejected with
@code{-pedantic}.
@code{SELECT CASE} is supported for unsigned integers.
@}
@end smallexample
-A matching implementation for @code{get_values} in Fortran, that correctly
+A matching implementation for @code{get_values} in Fortran that correctly
receives the procedure pointer from C and is able to call it, is given
in the following @code{MODULE}:
@end smallexample
Next, we want to call a C routine that expects a procedure pointer argument
-and pass it a Fortran procedure (which clearly must be interoperable!).
+and pass it a Fortran procedure (that clearly must be interoperable!).
Again, the C function may be:
@smallexample
behave; however, the exact implementation is not standardized. In order
to allow the user to choose specific implementation details, compiler
directives can be used to set attributes of variables and procedures
-which are not part of the standard. Whether a given attribute is
+that are not part of the standard. Whether a given attribute is
supported and its exact effects depend on both the operating system and
on the processor; see
@ref{Top,,C Extensions,gcc,Using the GNU Compiler Collection (GCC)}
When you compile a @code{PROGRAM} with GNU Fortran, a function
with the name @code{main} (in the symbol table of the object file)
is generated, which initializes the libgfortran library and then
-calls the actual program which uses the name @code{MAIN__}, for
+calls the actual program that uses the name @code{MAIN__}, for
historic reasons. If you link GNU Fortran compiled procedures
to, e.g., a C or C++ program or to a Fortran program compiled by
a different compiler, the libgfortran library is not initialized
For @code{OPTIONAL} dummy arguments, an absent argument is denoted
by a NULL pointer, except for scalar dummy arguments of intrinsic type
-which have the @code{VALUE} attribute. For those, a hidden Boolean
+that have the @code{VALUE} attribute. For those, a hidden Boolean
argument (@code{logical(kind=C_bool),value}) is used to indicate
whether the argument is present.
-Arguments which are assumed-shape, assumed-rank or deferred-rank
+Arguments that are assumed-shape, assumed-rank or deferred-rank
arrays or, with @option{-fcoarray=lib}, allocatable scalar coarrays use
an array descriptor. All other arrays pass the address of the
first element of the array. With @option{-fcoarray=lib}, the token
@item @emph{NOTES}
This function may be called multiple times with and without new hash-accessors-
-pairs being added. The post-condition after each call has to be, that hashes
+pairs being added. The post-condition after each call has to be that hashes
can be looked up quickly and indexing on the lookup table of hash-accessor-pairs
is a constant time operation.
@end table
@ref{_gfortran_caf_get_by_ct}, i.e. a constant time operation is mandatory for
quick access.
-The GFortran compiler ensures, that
+The GFortran compiler ensures that
@code{_gfortran_caf_get_remote_function_index} is called once only for each
hash and the result be stored in a static variable to prevent future redundant
lookups.
@item @emph{Arguments}:
@multitable @columnfractions .15 .70
@item @var{token} @tab intent(in) An opaque pointer identifying the coarray.
-@item @var{offset} @tab intent(in) By which amount of bytes the actual data is
+@item @var{offset} @tab intent(in) The number of bytes the actual data is
shifted compared to the base address of the coarray.
@item @var{image_index} @tab intent(in) The ID of the remote image; must be a
positive number.
@item @emph{Arguments}:
@multitable @columnfractions .15 .70
@item @var{token} @tab intent(in) An opaque pointer identifying the coarray.
-@item @var{offset} @tab intent(in) By which amount of bytes the actual data is
+@item @var{offset} @tab intent(in) The number of bytes the actual data is
shifted compared to the base address of the coarray.
@item @var{image_index} @tab intent(in) The ID of the remote image; must be a
positive number.
@multitable @columnfractions .15 .70
@item @var{dst_token} @tab intent(in) An opaque pointer identifying the
destination coarray.
-@item @var{dst_offset} @tab intent(in) By which amount of bytes the actual data
+@item @var{dst_offset} @tab intent(in) The number of bytes the actual data
is shifted compared to the base address of the destination coarray.
@item @var{dst_image_index} @tab intent(in) The ID of the destination remote
image; must be a positive number.
triplet of the @var{dest} argument.
@item @var{src_token} @tab intent(in) An opaque pointer identifying the source
coarray.
-@item @var{src_offset} @tab intent(in) By which amount of bytes the actual data
+@item @var{src_offset} @tab intent(in) The number of bytes the actual data
is shifted compared to the base address of the source coarray.
@item @var{src_image_index} @tab intent(in) The ID of the source remote image;
must be a positive number.
is @code{NULL}, the function returns after having obtained the lock. If it is
non-@code{NULL}, then @var{acquired_lock} is assigned the value true (one) when
the lock could be obtained and false (zero) otherwise. Locking a lock variable
-which has already been locked by the same image is an error.
+that has already been locked by the same image is an error.
@item @emph{Syntax}:
@code{void _gfortran_caf_lock (caf_token_t token, size_t index, int image_index,
@item @emph{Description}:
Release a lock on the given image on a scalar locking variable or for the
given array element for an array-valued variable. Unlocking a lock variable
-which is unlocked or has been locked by a different image is an error.
+that is unlocked or has been locked by a different image is an error.
@item @emph{Syntax}:
@code{void _gfortran_caf_unlock (caf_token_t token, size_t index, int image_index,
@item @var{token} @tab intent(in) An opaque pointer identifying the coarray.
@item @var{index} @tab intent(in) Array index; first array index is 0. For
scalars, it is always 0.
-@item @var{until_count} @tab intent(in) The number of events which have to be
+@item @var{until_count} @tab intent(in) The number of events that have to be
available before the function returns.
@item @var{stat} @tab intent(out) Stores the STAT=; may be NULL.
@item @var{errmsg} @tab intent(out) When an error occurs, this is set to
@item @emph{Arguments}:
@multitable @columnfractions .15 .70
-@item @var{count} @tab intent(in) The number of images which are provided in
+@item @var{count} @tab intent(in) The number of images that are provided in
the next argument. For a zero-sized array, the value is zero. For
@code{sync images (*)}, the value is @math{-1}.
@item @var{images} @tab intent(in) An array with the images provided by the
@table @asis
@item @emph{Description}:
-Invoked for an @code{ERROR STOP} statement which has an integer argument. The
+Invoked for an @code{ERROR STOP} statement that has an integer argument. The
function should terminate the program with the specified exit code.
@table @asis
@item @emph{Description}:
-Invoked for an @code{ERROR STOP} statement which has a string as argument. The
+Invoked for an @code{ERROR STOP} statement that has a string as argument. The
function should terminate the program with a nonzero-exit code.
@item @emph{Syntax}:
@item @emph{Arguments}:
@multitable @columnfractions .15 .70
@item @var{token} @tab intent(in) An opaque pointer identifying the coarray.
-@item @var{offset} @tab intent(in) By which amount of bytes the actual data is
+@item @var{offset} @tab intent(in) The number of bytes the actual data is
shifted compared to the base address of the coarray.
@item @var{image_index} @tab intent(in) The ID of the remote image; must be a
positive number; zero indicates the current image when used noncoindexed.
@item @emph{Arguments}:
@multitable @columnfractions .15 .70
@item @var{token} @tab intent(in) An opaque pointer identifying the coarray.
-@item @var{offset} @tab intent(in) By which amount of bytes the actual data is
+@item @var{offset} @tab intent(in) The number of bytes the actual data is
shifted compared to the base address of the coarray.
@item @var{image_index} @tab intent(in) The ID of the remote image; must be a
positive number; zero indicates the current image when used noncoindexed.
@item @emph{Arguments}:
@multitable @columnfractions .15 .70
@item @var{token} @tab intent(in) An opaque pointer identifying the coarray.
-@item @var{offset} @tab intent(in) By which amount of bytes the actual data is
+@item @var{offset} @tab intent(in) The number of bytes the actual data is
shifted compared to the base address of the coarray.
@item @var{image_index} @tab intent(in) The ID of the remote image; must be a
positive number; zero indicates the current image when used noncoindexed.
-@item @var{old} @tab intent(out) The value which the atomic variable had
+@item @var{old} @tab intent(out) The value the atomic variable had
just before the cas operation.
@item @var{compare} @tab intent(in) The value used for comparison.
@item @var{new_val} @tab intent(in) The new value for the atomic variable,
@code{GFC_CAF_ATOMIC_ADD} (1), @code{GFC_CAF_ATOMIC_AND} (2),
@code{GFC_CAF_ATOMIC_OR} (3), @code{GFC_CAF_ATOMIC_XOR} (4).
@item @var{token} @tab intent(in) An opaque pointer identifying the coarray.
-@item @var{offset} @tab intent(in) By which amount of bytes the actual data is
+@item @var{offset} @tab intent(in) The number of bytes the actual data is
shifted compared to the base address of the coarray.
@item @var{image_index} @tab intent(in) The ID of the remote image; must be a
positive number; zero indicates the current image when used noncoindexed.
-@item @var{old} @tab intent(out) The value which the atomic variable had
+@item @var{old} @tab intent(out) The value the atomic variable had
just before the atomic operation.
@item @var{val} @tab intent(in) The new value for the atomic variable,
assigned to the atomic variable, if @code{compare} equals the value of the
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)},
respectively. The standard mandates that both data types shall have
-another kind, which have more precision. On typical target architectures
+another kind that has more precision. On typical target architectures
supported by @command{gfortran}, this kind type parameter is @code{KIND=8}.
Hence, @code{REAL(KIND=8)} and @code{DOUBLE PRECISION} are equivalent.
In the description of generic intrinsic procedures, the kind type parameter
@item @emph{Return value}:
The return value is a default-kind string with system-dependent length.
-It contains the compiler flags used to compile the file, which called
+It contains the compiler flags used to compile the file that called
the @code{COMPILER_OPTIONS} intrinsic.
@item @emph{Example}:
become, negative, or numerically less than previous values, during a single
run of the compiled program.
-Please note, that this implementation is thread safe if used within OpenMP
+Please note that this implementation is thread safe if used within OpenMP
directives, i.e., its state is consistent while called from multiple
threads. However, if @code{DTIME} is called from multiple threads, the result
is still the time since the last invocation. This may not give the intended
@item @emph{Arguments}:
@multitable @columnfractions .15 .70
@item @var{ARRAY} @tab Shall be an array of intrinsic type.
-@item @var{VALUE} @tab A scalar of intrinsic type which is in type
+@item @var{VALUE} @tab A scalar of intrinsic type that is in type
conformance with @var{ARRAY}.
@item @var{DIM} @tab (Optional) Shall be a scalar of type
@code{INTEGER}, with a value between one and the rank of @var{ARRAY},
@item @emph{Return value}:
-Scalar default integer with the value of the image index which corresponds
+Scalar default integer with the value of the image index that corresponds
to the cosubscripts. For invalid cosubscripts the result is zero.
@item @emph{Example}:
@end multitable
@item @emph{Return value}:
-Returns a @code{LOGICAL} of the default kind, which @code{.TRUE.} if
+Returns a @code{LOGICAL} of the default kind, which is @code{.TRUE.} if
@var{ARRAY} is contiguous and false otherwise.
@item @emph{Example}:
@end multitable
@item @emph{Return value}:
-Returns a @code{LOGICAL} of the default kind, which @code{.TRUE.} if
-@var{I} has the value which indicates an end of file condition for
+Returns a @code{LOGICAL} of the default kind, which is @code{.TRUE.} if
+@var{I} has the value that indicates an end of file condition for
@code{IOSTAT=} specifiers, and is @code{.FALSE.} otherwise.
@item @emph{Example}:
@end multitable
@item @emph{Return value}:
-Returns a @code{LOGICAL} of the default kind, which @code{.TRUE.} if
-@var{I} has the value which indicates an end of file condition for
+Returns a @code{LOGICAL} of the default kind, which is @code{.TRUE.} if
+@var{I} has the value that indicates an end of file condition for
@code{IOSTAT=} specifiers, and is @code{.FALSE.} otherwise.
@item @emph{Example}:
Scalar default-kind integer. If @var{DISTANCE} is not present or has value 0,
the number of images in the current team is returned. For values smaller or
equal distance to the initial team, it returns the number of images index
-on the ancestor team which has a distance of @var{DISTANCE} from the invoking
+on the ancestor team that has a distance of @var{DISTANCE} from the invoking
team. If @var{DISTANCE} is larger than the distance to the initial team, the
number of images of the initial team is returned. If @var{FAILED} is not present
the total number of images is returned; if it has the value @code{.TRUE.},
-the number of failed images is returned, otherwise, the number of images which
+the number of failed images is returned, otherwise, the number of images that
do have not the failed status.
@item @emph{Example}:
@var{DISTANCE} is not present or has value 0, its value is the image index on
the invoking image for the current team, for values smaller or equal
distance to the initial team, it returns the image index on the ancestor team
-which has a distance of @var{DISTANCE} from the invoking team. If
+that has a distance of @var{DISTANCE} from the invoking team. If
@var{DISTANCE} is larger than the distance to the initial team, the image
index of the initial team is returned. Otherwise when the @var{COARRAY} is
present, if @var{DIM} is not present, a rank-1 array with corank elements is
@end multitable
@item @emph{Return value}:
-A scalar of type @code{CHARACTER} which length is that of @var{STRING}
+A scalar of type @code{CHARACTER} that is the length of @var{STRING}
less the number of trailing blanks.
@item @emph{Example}:
@itemize @bullet
@item i386 and x86_64 processors
-@item platforms which use the GNU C Library (glibc)
-@item platforms with support for SysV/386 routines for floating point
+@item platforms that use the GNU C Library (glibc)
+@item platforms with support for SysV/386 routines for floating-point
interface (including Solaris and BSDs)
@item platforms with the AIX OS
@end itemize
between the calls and the procedure definition, or with mismatches
between different calls. Such code is nonconforming, and is usually
flagged with an error. This options degrades the error to a
-warning, which can only be disabled by disabling all warnings via
+warning that can only be disabled by disabling all warnings via
@option{-w}. Only a single occurrence per argument is flagged by this
warning. @option{-fallow-argument-mismatch} is implied by
@option{-std=legacy}.
Using this option is @emph{strongly} discouraged. It is possible to
-provide standard-conforming code which allows different types of
+provide standard-conforming code that allows different types of
arguments by using an explicit interface and @code{TYPE(*)}.
@opindex allow-invalid-boz
@item -P
Inhibit generation of linemarkers in the output from the preprocessor.
This might be useful when running the preprocessor on something that
-is not C code, and is sent to a program which might be confused
+is not C code, and is sent to a program that might be confused
by the linemarkers.
@opindex U@var{name}
continues to process the program in an attempt to report further errors
to aid in debugging, but does not produce any compiled output.
-Warnings are diagnostic messages that report constructions which
-are not inherently erroneous but which are risky or suggest there is
+Warnings are diagnostic messages that report constructions that
+are not inherently erroneous but that are risky or suggest there is
likely to be a bug in the program. Unless @option{-Werror} is specified,
they do not prevent compilation of the program.
@cindex extra warnings
@cindex warnings, extra
@item -Wextra
-Enables some warning options for usages of language features which
+Enables some warning options for usages of language features that
may be problematic. This currently includes @option{-Wcompare-reals},
@option{-Wunused-parameter} and @option{-Wdo-subscript}.
big-endian representation for unformatted files; @samp{little-endian}, use
little-endian representation for unformatted files.
-On POWER systems which suppport @option{-mabi=ieeelongdouble},
+On POWER systems that suppport @option{-mabi=ieeelongdouble},
there are additional options, which can be combined with others with
commas. Those are
@itemize @w{}
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.
+errors for features that have only recently been added.
@opindex 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
+generate internal compiler errors for features that have only
recently been added.
@opindex fdump-fortran-original
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
+generate internal compiler errors for features that have only
recently been added.
@opindex fdump-parse-tree
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
+compiler errors for features that have only recently been added. This
option is deprecated; use @code{-fdump-fortran-original} instead.
@item -save-temps
Most of them have both positive and negative forms; the negative form
of @option{-ffoo} would be @option{-fno-foo}. In the table below, only
-one of the forms is listed---the one which is not the default. You
+one of the forms is listed---the one that is not the default. You
can figure out the other form by either removing @option{no-} or adding
it.
@emph{Caution:} It is not a good idea to mix Fortran code compiled with
@option{-ff2c} with code compiled with the default @option{-fno-f2c}
calling conventions as, calling @code{COMPLEX} or default @code{REAL}
-functions between program parts which were compiled with different
+functions between program parts that were compiled with different
calling conventions will break at execution time.
-@emph{Caution:} This breaks code which passes intrinsic functions
+@emph{Caution:} This breaks code that passes intrinsic functions
of type default @code{REAL} or @code{COMPLEX} as actual arguments, as
the library implementations use the @option{-fno-f2c} calling conventions.
@item @samp{recursion}
Enable generation of run-time checks for recursively called subroutines and
-functions which are not marked as recursive. See also @option{-frecursive}.
+functions that are not marked as recursive. See also @option{-frecursive}.
Note: This check does not work for OpenMP programs and is disabled if used
together with @option{-frecursive} and @option{-fopenmp}.
@end table
It is @emph{very strongly} recommended to fix the code in question.
The @option{-fc-prototypes-external} option can be used to generate
-prototypes which conform to gfortran's ABI, for inclusion in the
+prototypes that conform to gfortran's ABI, for inclusion in the
source code.
Support for this option will likely be withdrawn in a future release
on the stack; if the size is exceeded static memory is used (except in
procedures marked as @code{RECURSIVE}).
Use the option @option{-frecursive} to
-allow for recursive procedures which do not have a
+allow for recursive procedures that do not have a
@code{RECURSIVE} attribute or
for parallel programs. Use @option{-fno-automatic} to never use the stack.
When passing an assumed-shape argument of a procedure as actual
argument to an assumed-size or explicit size or as argument to a
procedure that does not have an explicit interface, the argument may
-have to be packed, that is put into contiguous memory. An example is
+have to be packed; that is, put into contiguous memory. An example is
the call to @code{foo} in
@smallexample
subroutine foo(a)
standard output. @code{ENUM} is not yet supported.
The generated prototypes may need inclusion of an appropriate header,
-such as @code{<stdint.h>} or @code{<stdlib.h>}. For types which are
+such as @code{<stdint.h>} or @code{<stdlib.h>}. For types that are
not specified using the appropriate kind from the @code{iso_c_binding}
module, a warning is added as a comment to the code.