OSDN Git Service

2009-11-19 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / gfortran.texi
index f0b1c67..1430c8a 100644 (file)
@@ -808,7 +808,8 @@ was used.
 @section Fortran 2003 status
 
 GNU Fortran supports several Fortran 2003 features; an incomplete
-list can be found below.
+list can be found below.  See also the
+@uref{http://gcc.gnu.org/wiki/Fortran2003, wiki page} about Fortran 2003.
 
 @itemize
 @item 
@@ -820,7 +821,8 @@ Intrinsics @code{command_argument_count}, @code{get_command},
 @cindex array, constructors
 @cindex @code{[...]}
 Array constructors using square brackets. That is, @code{[...]} rather
-than @code{(/.../)}.
+than @code{(/.../)}.  Type-specification for array constructors like
+@code{(/ some-type :: ... /)}.
 
 @item
 @cindex @code{FLUSH} statement
@@ -858,6 +860,14 @@ 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,
@@ -904,7 +914,23 @@ Renaming of operators in the @code{USE} statement.
 Interoperability with C (ISO C Bindings)
 
 @item
-BOZ as argument of INT, REAL, DBLE and CMPLX.
+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
 
@@ -916,7 +942,7 @@ The next version of the Fortran standard after Fortran 2003 is currently
 being worked on by the Working Group 5 of Sub-Committee 22 of the Joint
 Technical Committee 1 of the International Organization for
 Standardization (ISO) and the International Electrotechnical Commission
-(IEC). This group is known at @uref{http://www.nag.co.uk/sc22wg5/, WG5}.
+(IEC). This group is known as @uref{http://www.nag.co.uk/sc22wg5/, WG5}.
 The next revision of the Fortran standard is informally referred to as
 Fortran 2008, reflecting its planned release year. The GNU Fortran
 compiler has support for some of the new features in Fortran 2008. This
@@ -925,6 +951,9 @@ support is based on the latest draft, available from
 differ from the drafts, no guarantee of backward compatibility can be
 made and you should only use it for experimental purposes.
 
+The @uref{http://gcc.gnu.org/wiki/Fortran2008Status, wiki} has some information
+about the current Fortran 2008 implementation status.
+
 
 @c ---------------------------------------------------------------------
 @c Compiler Characteristics
@@ -1789,7 +1818,7 @@ c     ... Code that sets A, B and C
 with the following:
 
 @smallexample
-      INTEGER*1 LINE(80)
+      CHARACTER(LEN=80) LINE
       REAL A, B, C
 c     ... Code that sets A, B and C
       WRITE (UNIT=LINE, FMT=9000) A, B, C
@@ -1965,10 +1994,10 @@ a macro. Use the @code{IERRNO} intrinsic (GNU extension) instead.
 Subroutines and functions have to have the @code{BIND(C)} attribute to
 be compatible with C. The dummy argument declaration is relatively
 straightforward. However, one needs to be careful because C uses
-call-by-value by default while GNU Fortran uses call-by-reference.
-Furthermore, strings and pointers are handled differently. Note that
-only explicit size and assumed-size arrays are supported but not
-assumed-shape or allocatable arrays.
+call-by-value by default while Fortran behaves usually similar to
+call-by-reference. Furthermore, strings and pointers are handled
+differently. Note that only explicit size and assumed-size arrays are
+supported but not assumed-shape or allocatable arrays.
 
 To pass a variable by value, use the @code{VALUE} attribute.
 Thus the following C prototype
@@ -1980,9 +2009,10 @@ Thus the following C prototype
 matches the Fortran declaration
 
 @smallexample
-  integer(c_int) func(i,j)
-    integer, VALUE :: i
-    integer :: j
+  integer(c_int) function func(i,j)
+    use iso_c_binding, only: c_int
+    integer(c_int), VALUE :: i
+    integer(c_int) :: j
 @end smallexample
 
 Note that pointer arguments also frequently need the @code{VALUE} attribute.
@@ -2277,7 +2307,7 @@ initialization using @code{_gfortran_set_args}.
 Default: enabled.
 @item @var{option}[6] @tab Enables run-time checking. Possible values
 are (bitwise or-ed): GFC_RTCHECK_BOUNDS (1), GFC_RTCHECK_ARRAY_TEMPS (2),
-GFC_RTCHECK_RECURSION (4), GFC_RTCHECK_DO (16).
+GFC_RTCHECK_RECURSION (4), GFC_RTCHECK_DO (16), GFC_RTCHECK_POINTER (32).
 Default: disabled.
 @item @var{option}[7] @tab If non zero, range checking is enabled.
 Default: enabled. See -frange-check (@pxref{Code Gen Options}).