OSDN Git Service

PR fortran/50409
[pf3gnuchains/gcc-fork.git] / gcc / fortran / gfortran.texi
index 53f5c03..6a1c92b 100644 (file)
@@ -1,7 +1,7 @@
 \input texinfo  @c -*-texinfo-*-
 @c %**start of header
 @setfilename gfortran.info
-@set copyrights-gfortran 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+@set copyrights-gfortran 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
 
 @include gcc-common.texi
 
@@ -222,7 +222,7 @@ compiler.
 The GNU Fortran compiler front end was
 designed initially as a free replacement for,
 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 will use to invoke the compiler.
 
 @menu
 * About GNU Fortran::    What you should know about the GNU Fortran compiler.
@@ -261,7 +261,7 @@ place.  The result after compilation of a program is
 @dfn{machine code},
 code designed to be efficiently translated and processed
 by a machine such as your computer.
-Humans usually aren't as good writing machine code
+Humans usually are not as good writing machine code
 as they are at writing Fortran (or C++, Ada, or Java),
 because it is easy to make tiny mistakes writing machine code.
 
@@ -530,7 +530,7 @@ support is reported in the @ref{Fortran 2003 status} and
 @ref{Fortran 2008 status} sections of the documentation.
 
 Additionally, the GNU Fortran compilers supports the OpenMP specification
-(version 3.0, @url{http://openmp.org/@/wp/@/openmp-specifications/}).
+(version 3.1, @url{http://openmp.org/@/wp/@/openmp-specifications/}).
 
 @node Varying Length Character Strings
 @subsection Varying Length Character Strings
@@ -579,16 +579,14 @@ Malformed environment variables are silently ignored.
 * GFORTRAN_STDIN_UNIT:: Unit number for standard input
 * GFORTRAN_STDOUT_UNIT:: Unit number for standard output
 * GFORTRAN_STDERR_UNIT:: Unit number for standard error
-* GFORTRAN_USE_STDERR:: Send library output to standard error
 * GFORTRAN_TMPDIR:: Directory for scratch files
-* GFORTRAN_UNBUFFERED_ALL:: Don't buffer I/O for all units.
-* GFORTRAN_UNBUFFERED_PRECONNECTED:: Don't buffer I/O for preconnected units.
+* GFORTRAN_UNBUFFERED_ALL:: Do not buffer I/O for all units.
+* GFORTRAN_UNBUFFERED_PRECONNECTED:: Do not buffer I/O for preconnected units.
 * GFORTRAN_SHOW_LOCUS::  Show location for runtime errors
 * GFORTRAN_OPTIONAL_PLUS:: Print leading + where permitted
 * GFORTRAN_DEFAULT_RECL:: Default record length for new files
 * GFORTRAN_LIST_SEPARATOR::  Separator for list output
 * GFORTRAN_CONVERT_UNIT::  Set endianness for unformatted I/O
-* GFORTRAN_ERROR_DUMPCORE:: Dump core on run-time errors
 * GFORTRAN_ERROR_BACKTRACE:: Show backtrace on run-time errors
 @end menu
 
@@ -613,14 +611,6 @@ This environment variable can be used to select the unit number
 preconnected to standard error.  This must be a positive integer.
 The default value is 0.
 
-@node GFORTRAN_USE_STDERR
-@section @env{GFORTRAN_USE_STDERR}---Send library output to standard error
-
-This environment variable controls where library output is sent.
-If the first letter is @samp{y}, @samp{Y} or @samp{1}, standard
-error is used.  If the first letter is @samp{n}, @samp{N} or
-@samp{0}, standard output is used.
-
 @node GFORTRAN_TMPDIR
 @section @env{GFORTRAN_TMPDIR}---Directory for scratch files
 
@@ -630,7 +620,7 @@ GNU Fortran searches for the environment variable @env{TMP}, then @env{TEMP}.
 If these are missing, the default is @file{/tmp}.
 
 @node GFORTRAN_UNBUFFERED_ALL
-@section @env{GFORTRAN_UNBUFFERED_ALL}---Don't buffer I/O on all units
+@section @env{GFORTRAN_UNBUFFERED_ALL}---Do not buffer I/O on all units
 
 This environment variable controls whether all I/O is unbuffered.  If
 the first letter is @samp{y}, @samp{Y} or @samp{1}, all I/O is
@@ -639,7 +629,7 @@ the first letter is @samp{n}, @samp{N} or @samp{0}, I/O is buffered.
 This is the default.
 
 @node GFORTRAN_UNBUFFERED_PRECONNECTED
-@section @env{GFORTRAN_UNBUFFERED_PRECONNECTED}---Don't buffer I/O on preconnected units
+@section @env{GFORTRAN_UNBUFFERED_PRECONNECTED}---Do not buffer I/O on preconnected units
 
 The environment variable named @env{GFORTRAN_UNBUFFERED_PRECONNECTED} controls
 whether I/O on a preconnected unit (i.e.@: STDOUT or STDERR) is unbuffered.  If 
@@ -652,7 +642,7 @@ is @samp{n}, @samp{N} or @samp{0}, I/O is buffered.  This is the default.
 
 If the first letter is @samp{y}, @samp{Y} or @samp{1}, filename and
 line numbers for runtime errors are printed.  If the first letter is
-@samp{n}, @samp{N} or @samp{0}, don't print filename and line numbers
+@samp{n}, @samp{N} or @samp{0}, do not print filename and line numbers
 for runtime errors.  The default is to print the location.
 
 @node GFORTRAN_OPTIONAL_PLUS
@@ -754,26 +744,15 @@ environment variable will override the CONVERT specifier in the
 open statement}.  This is to give control over data formats to
 users who do not have the source code of their program available.
 
-@node GFORTRAN_ERROR_DUMPCORE
-@section @env{GFORTRAN_ERROR_DUMPCORE}---Dump core on run-time errors
-
-If the @env{GFORTRAN_ERROR_DUMPCORE} variable is set to
-@samp{y}, @samp{Y} or @samp{1} (only the first letter is relevant)
-then library run-time errors cause core dumps.  To disable the core
-dumps, set the variable to @samp{n}, @samp{N}, @samp{0}.  Default
-is not to core dump unless the @option{-fdump-core} compile option
-was used.
-
 @node GFORTRAN_ERROR_BACKTRACE
 @section @env{GFORTRAN_ERROR_BACKTRACE}---Show backtrace on run-time errors
 
-If the @env{GFORTRAN_ERROR_BACKTRACE} variable is set to
-@samp{y}, @samp{Y} or @samp{1} (only the first letter is relevant)
-then a backtrace is printed when a run-time error occurs.
-To disable the backtracing, set the variable to
-@samp{n}, @samp{N}, @samp{0}.  Default is not to print a backtrace
-unless the @option{-fbacktrace} compile option
-was used.
+If the @env{GFORTRAN_ERROR_BACKTRACE} variable is set to @samp{y},
+@samp{Y} or @samp{1} (only the first letter is relevant) then a
+backtrace is printed when a serious run-time error occurs.  To disable
+the backtracing, set the variable to @samp{n}, @samp{N}, @samp{0}.
+Default is to print a backtrace unless the @option{-fno-backtrace}
+compile option was used.
 
 @c =====================================================================
 @c PART II: LANGUAGE REFERENCE
@@ -793,6 +772,7 @@ was used.
 @menu
 * Fortran 2003 status::
 * Fortran 2008 status::
+* TS 29113 status::
 @end menu
 
 @node Fortran 2003 status
@@ -803,18 +783,75 @@ list can be found below.  See also the
 @uref{http://gcc.gnu.org/wiki/Fortran2003, wiki page} about Fortran 2003.
 
 @itemize
-@item 
-Intrinsics @code{command_argument_count}, @code{get_command},
-@code{get_command_argument}, @code{get_environment_variable}, and
-@code{move_alloc}.
+@item Procedure pointers including procedure-pointer components with
+@code{PASS} attribute.
+
+@item Procedures which are bound to a derived type (type-bound procedures)
+including @code{PASS}, @code{PROCEDURE} and @code{GENERIC}, and
+operators bound to a type.
+
+@item Abstract interfaces and type extension with the possibility to
+override type-bound procedures or to have deferred binding.
+
+@item Polymorphic entities (``@code{CLASS}'') for derived types -- including
+@code{SAME_TYPE_AS}, @code{EXTENDS_TYPE_OF} and @code{SELECT TYPE}.
+Note that the support for array-valued polymorphic entities is incomplete
+and unlimited polymophism is currently not supported.
+
+@item The @code{ASSOCIATE} construct.
+
+@item Interoperability with C including enumerations, 
+
+@item In structure constructors the components with default values may be
+omitted.
+
+@item Extensions to the @code{ALLOCATE} statement, allowing for a
+type-specification with type parameter and for allocation and initialization
+from a @code{SOURCE=} expression; @code{ALLOCATE} and @code{DEALLOCATE}
+optionally return an error message string via @code{ERRMSG=}.
+
+@item Reallocation on assignment: If an intrinsic assignment is
+used, an allocatable variable on the left-hand side is automatically allocated
+(if unallocated) or reallocated (if the shape is different). Currently, scalar
+deferred character length left-hand sides are correctly handled but arrays
+are not yet fully implemented.
+
+@item Transferring of allocations via @code{MOVE_ALLOC}.
+
+@item The @code{PRIVATE} and @code{PUBLIC} attributes may be given individually
+to derived-type components.
+
+@item In pointer assignments, the lower bound may be specified and
+the remapping of elements is supported.
 
-@item 
+@item For pointers an @code{INTENT} may be specified which affect the
+association status not the value of the pointer target.
+
+@item Intrinsics @code{command_argument_count}, @code{get_command},
+@code{get_command_argument}, and @code{get_environment_variable}.
+
+@item Support for unicode characters (ISO 10646) and UTF-8, including
+the @code{SELECTED_CHAR_KIND} and @code{NEW_LINE} intrinsic functions.
+
+@item Support for binary, octal and hexadecimal (BOZ) constants in the
+intrinsic functions @code{INT}, @code{REAL}, @code{CMPLX} and @code{DBLE}.
+
+@item Support for namelist variables with allocatable and pointer
+attribute and nonconstant length type parameter.
+
+@item
 @cindex array, constructors
 @cindex @code{[...]}
 Array constructors using square brackets.  That is, @code{[...]} rather
 than @code{(/.../)}.  Type-specification for array constructors like
 @code{(/ some-type :: ... /)}.
 
+@item Extensions to the specification and initialization expressions,
+including the support for intrinsics with real and complex arguments.
+
+@item Support for the asynchronous input/output syntax; however, the
+data transfer is currently always synchronously performed. 
+
 @item
 @cindex @code{FLUSH} statement
 @cindex statement, @code{FLUSH}
@@ -851,14 +888,6 @@ TR 15581:
 @end itemize
 
 @item
-@cindex @code{ALLOCATE}
-The @code{ERRMSG=} tag is now supported in @code{ALLOCATE} and
-@code{DEALLOCATE} statements.  The @code{SOURCE=} tag is supported
-in an @code{ALLOCATE} statement.  An @emph{intrinsic-type-spec}
-can be used as the @emph{type-spec} in an @code{ALLOCATE} statement;
-while the use of a @emph{derived-type-name} is currently unsupported.
-
-@item
 @cindex @code{STREAM} I/O
 @cindex @code{ACCESS='STREAM'} I/O
 The @code{OPEN} statement supports the @code{ACCESS='STREAM'} specifier,
@@ -867,6 +896,10 @@ allowing I/O without any record structure.
 @item
 Namelist input/output for internal files.
 
+@item Further I/O extensions: Rounding during formatted output, using of
+a decimal comma instead of a decimal point, setting whether a plus sign
+should appear for positive numbers.
+
 @item
 @cindex @code{PROTECTED} statement
 @cindex statement, @code{PROTECTED}
@@ -888,6 +921,11 @@ The @code{VOLATILE} statement and attribute.
 The @code{IMPORT} statement, allowing to import
 host-associated derived types.
 
+@item The intrinsic modules @code{ISO_FORTRAN_ENVIRONMENT} is supported,
+which contains parameters of the I/O units, storage sizes. Additionally,
+procedures for C interoperability are available in the @code{ISO_C_BINDING}
+module.
+
 @item
 @cindex @code{USE, INTRINSIC} statement
 @cindex statement, @code{USE, INTRINSIC}
@@ -895,34 +933,11 @@ host-associated derived types.
 @cindex statement, @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}.
+@code{ISO_C_BINDING}, @code{OMP_LIB} and @code{OMP_LIB_KINDS}.
 
 @item
 Renaming of operators in the @code{USE} statement.
 
-@item
-@cindex ISO C Bindings
-Interoperability with C (ISO C Bindings)
-
-@item
-BOZ as argument of @code{INT}, @code{REAL}, @code{DBLE} and @code{CMPLX}.
-
-@item
-@cindex type-bound procedure
-@cindex type-bound operator
-Type-bound procedures with @code{PROCEDURE} or @code{GENERIC}, and operators
-bound to a derived-type.
-
-@item
-@cindex @code{EXTENDS}
-@cindex derived-type extension
-Extension of derived-types (the @code{EXTENDS(...)} syntax).
-
-@item
-@cindex @code{ABSTRACT} type
-@cindex @code{DEFERRED} procedure binding
-@code{ABSTRACT} derived-types and declaring procedure bindings @code{DEFERRED}.
-
 @end itemize
 
 
@@ -939,8 +954,8 @@ International Organization for Standardization and the International
 Electrotechnical Commission (IEC).  This group is known as
 @uref{http://www.nag.co.uk/sc22wg5/, WG5}.
 
-The GNU Fortran supports several of the new features of Fortran 2008; the
-@uref{http://gcc.gnu.org/wiki/Fortran2008Status, wiki} has some information
+The GNU Fortran compiler supports several of the new features of Fortran 2008;
+the @uref{http://gcc.gnu.org/wiki/Fortran2008Status, wiki} has some information
 about the current Fortran 2008 implementation status.  In particular, the
 following is implemented.
 
@@ -988,8 +1003,11 @@ the intrinsic module @code{ISO_FORTRAN_ENV}.
 @code{ISO_C_BINDINGS} and @code{COMPILER_VERSION} and @code{COMPILER_OPTIONS}
 of @code{ISO_FORTRAN_ENV}.
 
-@item Experimental coarray support (for one image only), use the
-@option{-fcoarray=single} flag to enable it.
+@item Coarray support for serial programs with @option{-fcoarray=single} flag
+and experimental support for multiple images with the @option{-fcoarray=lib}
+flag.
+
+@item The @code{DO CONCURRENT} construct is supported.
 
 @item The @code{BLOCK} construct is supported.
 
@@ -1034,6 +1052,29 @@ arrays are supported for named constants (@code{PARAMETER}).
 
 
 
+@node TS 29113 status
+@section Technical Specification 29113 Status
+
+GNU Fortran supports some of the new features of the Technical
+Specification (TS) 29113 on Further Interoperability of Fortran with C.
+The @uref{http://gcc.gnu.org/wiki/TS29113Status, wiki} has some information
+about the current TS 29113 implementation status.  In particular, the
+following is implemented.
+
+@itemize
+@item The @option{-std=f2008ts} option.
+
+@item The @code{OPTIONAL} attribute is allowed for dummy arguments
+of @code{BIND(C) procedures.}
+
+@item The RANK intrinsic is supported.
+
+@item GNU Fortran's implementation for variables with @code{ASYNCHRONOUS}
+attribute is compatible with TS 29113.
+@end itemize
+
+
+
 @c ---------------------------------------------------------------------
 @c Compiler Characteristics
 @c ---------------------------------------------------------------------
@@ -1048,6 +1089,7 @@ might in some way or another become visible to the programmer.
 @menu
 * KIND Type Parameters::
 * Internal representation of LOGICAL variables::
+* Thread-safety of the runtime library::
 @end menu
 
 
@@ -1122,6 +1164,36 @@ representation of @code{LOGICAL} variables in GNU Fortran is identical
 to C99 _Bool, except for a possible difference in storage size
 depending on the kind.
 
+
+@node Thread-safety of the runtime library
+@section Thread-safety of the runtime library
+@cindex thread-safety, threads
+
+GNU Fortran can be used in programs with multiple threads, e.g.@: by
+using OpenMP, by calling OS thread handling functions via the
+@code{ISO_C_BINDING} facility, or by GNU Fortran compiled library code
+being called from a multi-threaded program.
+
+The GNU Fortran runtime library, (@code{libgfortran}), supports being
+called concurrently from multiple threads with the following
+exceptions. 
+
+During library initialization, the C @code{getenv} function is used,
+which need not be thread-safe.  Similarly, the @code{getenv}
+function is used to implement the @code{GET_ENVIRONMENT_VARIABLE} and
+@code{GETENV} intrinsics.  It is the responsibility of the user to
+ensure that the environment is not being updated concurrently when any
+of these actions are taking place.
+
+The @code{EXECUTE_COMMAND_LINE} and @code{SYSTEM} intrinsics are
+implemented with the @code{system} function, which need not be
+thread-safe.  It is the responsibility of the user to ensure that
+@code{system} is not called concurrently.
+
+Finally, for platforms not supporting thread-safe POSIX functions,
+further functionality might not be thread-safe.  For details, please
+consult the documentation for your operating system.
+
 @c ---------------------------------------------------------------------
 @c Extensions
 @c ---------------------------------------------------------------------
@@ -1171,6 +1243,7 @@ without warning.
 * Missing period in FORMAT specifications::
 * I/O item lists::
 * BOZ literal constants::
+* @code{Q} exponent-letter::
 * Real array indices::
 * Unary operators::
 * Implicitly convert LOGICAL and INTEGER values::
@@ -1361,6 +1434,18 @@ To support legacy codes, GNU Fortran allows the input item list
 of the @code{READ} statement, and the output item lists of the
 @code{WRITE} and @code{PRINT} statements, to start with a comma.
 
+@node @code{Q} exponent-letter
+@subsection @code{Q} exponent-letter
+@cindex @code{Q} exponent-letter
+
+GNU Fortran accepts real literal constants with an exponent-letter
+of @code{Q}, for example, @code{1.23Q45}.  The constant is interpreted
+as a @code{REAL(16)} entity on targets that suppports this type.  If
+the target does not support @code{REAL(16)} but has a @code{REAL(10)}
+type, then the real-literal-constant will be interpreted as a
+@code{REAL(10)} entity.  In the absence of @code{REAL(16)} and
+@code{REAL(10)}, an error will occur.
+
 @node BOZ literal constants
 @subsection BOZ literal constants
 @cindex BOZ literal constants
@@ -1686,8 +1771,8 @@ It consists of a set of compiler directives, library routines,
 and environment variables that influence run-time behavior.
 
 GNU Fortran strives to be compatible to the 
-@uref{http://www.openmp.org/mp-documents/spec30.pdf,
-OpenMP Application Program Interface v3.0}.
+@uref{http://www.openmp.org/mp-documents/spec31.pdf,
+OpenMP Application Program Interface v3.1}.
 
 To enable the processing of the OpenMP directive @code{!$omp} in
 free-form source code; the @code{c$omp}, @code{*$omp} and @code{!$omp}
@@ -1868,7 +1953,7 @@ store_catalog(7)%id = 7831
 store_catalog(7)%description = "milk bottle"
 store_catalog(7)%price = 1.2
 
-! Assignments of a whole variable don't change
+! Assignments of a whole variable do not change
 store_catalog(12) = pear
 print *, store_catalog(12)
 @end example
@@ -1889,7 +1974,7 @@ print *, store_catalog(12)
 @cindex @code{ENCODE}
 @cindex @code{DECODE}
 
-GNU Fortran doesn't support the @code{ENCODE} and @code{DECODE}
+GNU Fortran does not support the @code{ENCODE} and @code{DECODE}
 statements.  These statements are best replaced by @code{READ} and
 @code{WRITE} statements involving internal files (@code{CHARACTER}
 variables and arrays), which have been part of the Fortran standard since
@@ -2249,10 +2334,10 @@ Procedure pointers are handled analogously to pointers; the C type is
 @code{TYPE(C_FUNPTR)} and the intrinsic conversion procedures are
 @code{C_F_PROCPOINTER} and @code{C_FUNLOC}.
 
-Let's consider two examples of actually passing a procedure pointer from
+Let us consider two examples of actually passing a procedure pointer from
 C to Fortran and vice versa.  Note that these examples are also very
-similar to passing ordinary pointers between both languages.
-First, consider this code in C:
+similar to passing ordinary pointers between both languages. First,
+consider this code in C:
 
 @smallexample
 /* Procedure implemented in Fortran.  */
@@ -2370,22 +2455,20 @@ END MODULE m
 Assumed-shape and allocatable arrays are passed using an array descriptor
 (dope vector).  The internal structure of the array descriptor used
 by GNU Fortran is not yet documented and will change.  There will also be
-a Technical Report (TR 29113) which standardizes an interoperable
+a Technical Specification (TS 29113) which standardizes an interoperable
 array descriptor.  Until then, you can use the Chasm Language
 Interoperability Tools, @url{http://chasm-interop.sourceforge.net/},
 which provide an interface to GNU Fortran's array descriptor.
 
-The technical report 29113 will presumably also include support for
-C-interoperable @code{OPTIONAL} and for assumed-rank and assumed-type
-dummy arguments.  However, the TR has neither been approved nor implemented
-in GNU Fortran; therefore, these features are not yet available.
+GNU Fortran already supports the C-interoperable @code{OPTIONAL}
+attribute; for absent arguments, a @code{NULL} pointer is passed.
 
 
 
 @node GNU Fortran Compiler Directives
 @section GNU Fortran Compiler Directives
 
-The Fortran standard standard describes how a conforming program shall
+The Fortran standard describes how a conforming program shall
 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
@@ -2520,7 +2603,7 @@ int main (int argc, char *argv[])
 @table @asis
 @item @emph{Description}:
 @code{_gfortran_set_options} sets several flags related to the Fortran
-standard to be used, whether backtracing or core dumps should be enabled
+standard to be used, whether backtracing should be enabled
 and whether range checks should be performed.  The syntax allows for
 upward compatibility since the number of passed flags is specified; for
 non-passed flags, the default value is used.  See also
@@ -2543,16 +2626,16 @@ if e.g. an input-output edit descriptor is invalid in a given standard.
 Possible values are (bitwise or-ed) @code{GFC_STD_F77} (1),
 @code{GFC_STD_F95_OBS} (2), @code{GFC_STD_F95_DEL} (4), @code{GFC_STD_F95}
 (8), @code{GFC_STD_F2003} (16), @code{GFC_STD_GNU} (32),
-@code{GFC_STD_LEGACY} (64), @code{GFC_STD_F2008} (128), and
-@code{GFC_STD_F2008_OBS} (256).  Default: @code{GFC_STD_F95_OBS
-| GFC_STD_F95_DEL | GFC_STD_F95 | GFC_STD_F2003 | GFC_STD_F2008
-| GFC_STD_F2008_OBS | GFC_STD_F77 | GFC_STD_GNU | GFC_STD_LEGACY}.
+@code{GFC_STD_LEGACY} (64), @code{GFC_STD_F2008} (128), 
+@code{GFC_STD_F2008_OBS} (256) and GFC_STD_F2008_TS (512). Default:
+@code{GFC_STD_F95_OBS | GFC_STD_F95_DEL | GFC_STD_F95 | GFC_STD_F2003
+| GFC_STD_F2008 | GFC_STD_F2008_TS | GFC_STD_F2008_OBS | GFC_STD_F77
+| GFC_STD_GNU | GFC_STD_LEGACY}.
 @item @var{option}[1] @tab Standard-warning flag; prints a warning to
 standard error.  Default: @code{GFC_STD_F95_DEL | GFC_STD_LEGACY}.
 @item @var{option}[2] @tab If non zero, enable pedantic checking.
 Default: off.
-@item @var{option}[3] @tab If non zero, enable core dumps on run-time
-errors.  Default: off.
+@item @var{option}[3] @tab Unused.
 @item @var{option}[4] @tab If non zero, enable backtracing on run-time
 errors.  Default: off.
 Note: Installs a signal handler and requires command-line
@@ -2569,8 +2652,8 @@ Default: enabled.  See -frange-check (@pxref{Code Gen Options}).
 
 @item @emph{Example}:
 @smallexample
-  /* Use gfortran 4.5 default options.  */
-  static int options[] = @{68, 255, 0, 0, 0, 1, 0, 1@};
+  /* Use gfortran 4.7 default options.  */
+  static int options[] = @{68, 511, 0, 0, 1, 1, 0, 1@};
   _gfortran_set_options (8, &options);
 @end smallexample
 @end table
@@ -2642,16 +2725,15 @@ int main (int argc, char *argv[])
 
 
 @node _gfortran_set_fpe
-@subsection @code{_gfortran_set_fpe} --- Set when a Floating Point Exception should be raised
+@subsection @code{_gfortran_set_fpe} --- Enable floating point exception traps
 @fnindex _gfortran_set_fpe
 @cindex libgfortran initialization, set_fpe
 
 @table @asis
 @item @emph{Description}:
-@code{_gfortran_set_fpe} sets the IEEE exceptions for which a
-Floating Point Exception (FPE) should be raised.  On most systems,
-this will result in a SIGFPE signal being sent and the program
-being interrupted.
+@code{_gfortran_set_fpe} enables floating point exception traps for
+the specified exceptions.  On most systems, this will result in a
+SIGFPE signal being sent and the program being aborted.
 
 @item @emph{Syntax}:
 @code{void _gfortran_set_fpe (int val)}
@@ -2662,7 +2744,7 @@ being interrupted.
 (bitwise or-ed) zero (0, default) no trapping,
 @code{GFC_FPE_INVALID} (1), @code{GFC_FPE_DENORMAL} (2),
 @code{GFC_FPE_ZERO} (4), @code{GFC_FPE_OVERFLOW} (8),
-@code{GFC_FPE_UNDERFLOW} (16), and @code{GFC_FPE_PRECISION} (32).
+@code{GFC_FPE_UNDERFLOW} (16), and @code{GFC_FPE_INEXACT} (32).
 @end multitable
 
 @item @emph{Example}:
@@ -2745,7 +2827,7 @@ some are completely orthogonal to the rest of what is
 happening on GNU Fortran,
 but others are ``mainstream'' projects in need of enthusiastic hackers.
 All of these projects are important!
-We'll eventually get around to the things here,
+We will eventually get around to the things here,
 but they are also things doable by someone who is willing and able.
 
 @menu