summaryrefslogtreecommitdiff
path: root/gcc/fortran/intrinsic.texi
diff options
context:
space:
mode:
authorkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-30 21:59:24 +0000
committerkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-30 21:59:24 +0000
commit10089e90bd4b103351854568b2463b275a8588a2 (patch)
treec29a5b32fa13860e9024f18229d3fa7c0d2d8a8b /gcc/fortran/intrinsic.texi
parenteea5ff47593afccfe0cd0be71778a74572914851 (diff)
downloadgcc-10089e90bd4b103351854568b2463b275a8588a2.tar.gz
2011-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/50573 * check.c (gfc_check_dshift): Update argument checking for BOZ. Update checking SHIFT against BITSIZE of I or J. * intrinsic.texi: Update docs for DSHIFTL and DSHIFTR. 2011-10-30 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/50573 * gfortran.dg/dshift_3.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180686 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/intrinsic.texi')
-rw-r--r--gcc/fortran/intrinsic.texi38
1 files changed, 24 insertions, 14 deletions
diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi
index 084cd15ea6f..24af4d5ac7d 100644
--- a/gcc/fortran/intrinsic.texi
+++ b/gcc/fortran/intrinsic.texi
@@ -3794,22 +3794,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 +3839,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