From: Mark Eggleston Date: Tue, 20 Aug 2019 10:08:10 +0000 (+0000) Subject: Intrinsic documentation changes. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a53aa4da8add4e3adc6c38f70eb172d570865831;p=gcc.git Intrinsic documentation changes. Add notes to DIM, MOD and MODULE stating that as a GNU extension, integers of different kinds are allowed as arguments and that the return value has the larger kind. From-SVN: r274744 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 1f447767003..3eca99ecc7c 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2019-08-20 Mark Eggleston + + PR fortran/89236 + * intrinsic.texi: Add GNU extension notes to DIM, MOD, MODULO. + 2019-08-19 Mark Eggleston * gfortran.texi: Delete paragraph about integer overload errors diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi index 3aa068dba9d..31b97c4def6 100644 --- a/gcc/fortran/intrinsic.texi +++ b/gcc/fortran/intrinsic.texi @@ -4876,11 +4876,13 @@ Elemental function @item @emph{Arguments}: @multitable @columnfractions .15 .70 @item @var{X} @tab The type shall be @code{INTEGER} or @code{REAL} -@item @var{Y} @tab The type shall be the same type and kind as @var{X}. +@item @var{Y} @tab The type shall be the same type and kind as @var{X}. (As +a GNU extension, arguments of different kinds are permitted.) @end multitable @item @emph{Return value}: -The return value is of type @code{INTEGER} or @code{REAL}. +The return value is of type @code{INTEGER} or @code{REAL}. (As a GNU +extension, kind is the largest kind of the actual arguments.) @item @emph{Example}: @smallexample @@ -10607,14 +10609,16 @@ Elemental function @multitable @columnfractions .15 .70 @item @var{A} @tab Shall be a scalar of type @code{INTEGER} or @code{REAL}. @item @var{P} @tab Shall be a scalar of the same type and kind as @var{A} -and not equal to zero. +and not equal to zero. (As a GNU extension, arguments of different kinds are +permitted.) @end multitable @item @emph{Return value}: The return value is the result of @code{A - (INT(A/P) * P)}. The type and kind of the return value is the same as that of the arguments. The returned value has the same sign as A and a magnitude less than the -magnitude of P. +magnitude of P. (As a GNU extension, kind is the largest kind of the actual +arguments.) @item @emph{Example}: @smallexample @@ -10678,11 +10682,13 @@ Elemental function @multitable @columnfractions .15 .70 @item @var{A} @tab Shall be a scalar of type @code{INTEGER} or @code{REAL}. @item @var{P} @tab Shall be a scalar of the same type and kind as @var{A}. -It shall not be zero. +It shall not be zero. (As a GNU extension, arguments of different kinds are +permitted.) @end multitable @item @emph{Return value}: -The type and kind of the result are those of the arguments. +The type and kind of the result are those of the arguments. (As a GNU +extension, kind is the largest kind of the actual arguments.) @table @asis @item If @var{A} and @var{P} are of type @code{INTEGER}: @code{MODULO(A,P)} has the value @var{R} such that @code{A=Q*P+R}, where @@ -12917,7 +12923,7 @@ Elemental function @item @emph{Arguments}: @multitable @columnfractions .15 .70 @item @var{A} @tab Shall be of type @code{INTEGER} or @code{REAL} -@item @var{B} @tab Shall be of the same type and kind as @var{A} +@item @var{B} @tab Shall be of the same type and kind as @var{A}. @end multitable @item @emph{Return value}: