OSDN Git Service

2012-01-09 Mikael Morin <mikael@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / intrinsic.texi
index a093bec..6d4c9ff 100644 (file)
@@ -1470,13 +1470,15 @@ If @var{Y} is zero, then @var{X} must be nonzero.
 @end multitable
 
 @item @emph{Return value}:
-The return value has the same type and kind type parameter as @var{Y}.
-It is the principal value of the complex number @math{X + i Y}.  If
-@var{X} is nonzero, then it lies in the range @math{-\pi \le \atan (x) \leq \pi}.
+The return value has the same type and kind type parameter as @var{Y}. It
+is the principal value of the complex number @math{X + i Y}.  If @var{X}
+is nonzero, then it lies in the range @math{-\pi \le \atan (x) \leq \pi}.
 The sign is positive if @var{Y} is positive.  If @var{Y} is zero, then
-the return value is zero if @var{X} is positive and @math{\pi} if @var{X}
-is negative.  Finally, if @var{X} is zero, then the magnitude of the result
-is @math{\pi/2}.
+the return value is zero if @var{X} is strictly positive, @math{\pi} if
+@var{X} is negative and @var{Y} is positive zero (or the processor does
+not handle signed zeros), and @math{-\pi} if @var{X} is negative and
+@var{Y} is negative zero.  Finally, if @var{X} is zero, then the
+magnitude of the result is @math{\pi/2}.
 
 @item @emph{Example}:
 @smallexample
@@ -2484,7 +2486,7 @@ The return value is of type integer and of the system-dependent kind
 number of bytes occupied by the argument.  If the argument has the
 @code{POINTER} attribute, the number of bytes of the storage area pointed
 to is returned.  If the argument is of a derived type with @code{POINTER}
-or @code{ALLOCATABLE} components, the return value doesn't account for
+or @code{ALLOCATABLE} components, the return value does not account for
 the sizes of the data pointed to by these components.
 
 @item @emph{Example}:
@@ -3794,22 +3796,27 @@ Elemental function
 
 @item @emph{Arguments}:
 @multitable @columnfractions .15 .70
-@item @var{I} @tab Shall be of type @code{INTEGER}.
-@item @var{J} @tab Shall be of type @code{INTEGER}, and of the same kind
-as @var{I}.
-@item @var{SHIFT} @tab Shall be of type @code{INTEGER}.
+@item @var{I} @tab Shall be of type @code{INTEGER} or a BOZ constant.
+@item @var{J} @tab Shall be of type @code{INTEGER} or a BOZ constant.
+If both @var{I} and @var{J} have integer type, then they shall have
+the same kind type parameter. @var{I} and @var{J} shall not both be
+BOZ constants.
+@item @var{SHIFT} @tab Shall be of type @code{INTEGER}. It shall
+be nonnegative.  If @var{I} is not a BOZ constant, then @var{SHIFT}
+shall be less than or equal to @code{BIT_SIZE(I)}; otherwise,
+@var{SHIFT} shall be less than or equal to @code{BIT_SIZE(J)}.
 @end multitable
 
 @item @emph{Return value}:
-The return value has same type and kind as @var{I}.
+If either @var{I} or @var{J} is a BOZ constant, it is first converted
+as if by the intrinsic function @code{INT} to an integer type with the
+kind type parameter of the other.
 
 @item @emph{See also}:
 @ref{DSHIFTR}
-
 @end table
 
 
-
 @node DSHIFTR
 @section @code{DSHIFTR} --- Combined right shift
 @fnindex DSHIFTR
@@ -3834,22 +3841,27 @@ Elemental function
 
 @item @emph{Arguments}:
 @multitable @columnfractions .15 .70
-@item @var{I} @tab Shall be of type @code{INTEGER}.
-@item @var{J} @tab Shall be of type @code{INTEGER}, and of the same kind
-as @var{I}.
-@item @var{SHIFT} @tab Shall be of type @code{INTEGER}.
+@item @var{I} @tab Shall be of type @code{INTEGER} or a BOZ constant.
+@item @var{J} @tab Shall be of type @code{INTEGER} or a BOZ constant.
+If both @var{I} and @var{J} have integer type, then they shall have
+the same kind type parameter. @var{I} and @var{J} shall not both be
+BOZ constants.
+@item @var{SHIFT} @tab Shall be of type @code{INTEGER}. It shall
+be nonnegative.  If @var{I} is not a BOZ constant, then @var{SHIFT}
+shall be less than or equal to @code{BIT_SIZE(I)}; otherwise,
+@var{SHIFT} shall be less than or equal to @code{BIT_SIZE(J)}.
 @end multitable
 
 @item @emph{Return value}:
-The return value has same type and kind as @var{I}.
+If either @var{I} or @var{J} is a BOZ constant, it is first converted
+as if by the intrinsic function @code{INT} to an integer type with the
+kind type parameter of the other.
 
 @item @emph{See also}:
 @ref{DSHIFTL}
-
 @end table
 
 
-
 @node DTIME
 @section @code{DTIME} --- Execution time subroutine (or function)
 @fnindex DTIME
@@ -8629,7 +8641,7 @@ cases, the result is of the same type and kind as @var{ARRAY}.
 @table @asis
 @item @emph{Description}:
 Returns the number of clock ticks since the start of the process, based
-on the UNIX function @code{clock(3)}.
+on the function @code{clock(3)} in the C standard library.
 
 This intrinsic is not fully portable, such as to systems with 32-bit
 @code{INTEGER} types but supporting times wider than 32 bits. Therefore,
@@ -8667,7 +8679,7 @@ the system does not support @code{clock(3)}.
 @table @asis
 @item @emph{Description}:
 Returns the number of clock ticks since the start of the process, based
-on the UNIX function @code{clock(3)}.
+on the function @code{clock(3)} in the C standard library.
 
 @emph{Warning:} this intrinsic does not increase the range of the timing
 values over that returned by @code{clock(3)}. On a system with a 32-bit
@@ -10222,7 +10234,7 @@ See @code{PRECISION} for an example.
 @code{RANK(A)} returns the rank of a scalar or array data object.
 
 @item @emph{Standard}:
-Technical Report (TR) 29113
+Technical Specification (TS) 29113
 
 @item @emph{Class}:
 Inquiry function
@@ -11457,9 +11469,10 @@ The return value is of type integer and of the system-dependent kind
 number of bytes occupied by the argument.  If the argument has the
 @code{POINTER} attribute, the number of bytes of the storage area pointed
 to is returned.  If the argument is of a derived type with @code{POINTER}
-or @code{ALLOCATABLE} components, the return value doesn't account for
+or @code{ALLOCATABLE} components, the return value does not account for
 the sizes of the data pointed to by these components. If the argument is
-polymorphic, the size according to the declared type is returned.
+polymorphic, the size according to the declared type is returned. The argument
+may not be a procedure or procedure pointer.
 
 @item @emph{Example}:
 @smallexample
@@ -11816,8 +11829,10 @@ Inquiry function
 @end multitable
 
 @item @emph{Return Value}:
-The result is a scalar integer with the kind type parameter speciļ¬ed by KIND (or default integer type if KIND is missing). The result value is the size expressed in bits for an element of an array that
-has the dynamic type and type parameters of A.
+The result is a scalar integer with the kind type parameter specified by KIND
+(or default integer type if KIND is missing). The result value is the size
+expressed in bits for an element of an array that has the dynamic type and type
+parameters of A.
 
 @item @emph{See also}:
 @ref{C_SIZEOF}, @ref{SIZEOF}
@@ -12209,8 +12224,8 @@ END IF
 @table @asis
 @item @emph{Description}:
 Returns the current time encoded as an integer (in the manner of the
-UNIX function @code{time(3)}). This value is suitable for passing to
-@code{CTIME}, @code{GMTIME}, and @code{LTIME}.
+function @code{time(3)} in the C standard library). This value is
+suitable for passing to @code{CTIME}, @code{GMTIME}, and @code{LTIME}.
 
 This intrinsic is not fully portable, such as to systems with 32-bit
 @code{INTEGER} types but supporting times wider than 32 bits. Therefore,
@@ -12250,8 +12265,8 @@ The return value is a scalar of type @code{INTEGER(4)}.
 @table @asis
 @item @emph{Description}:
 Returns the current time encoded as an integer (in the manner of the
-UNIX function @code{time(3)}). This value is suitable for passing to
-@code{CTIME}, @code{GMTIME}, and @code{LTIME}.
+function @code{time(3)} in the C standard library). This value is
+suitable for passing to @code{CTIME}, @code{GMTIME}, and @code{LTIME}.
 
 @emph{Warning:} this intrinsic does not increase the range of the timing
 values over that returned by @code{time(3)}. On a system with a 32-bit