diff options
author | Mark Eggleston <mark.eggleston@codethink.com> | 2019-08-20 10:08:10 +0000 |
---|---|---|
committer | Mark Eggleston <markeggleston@gcc.gnu.org> | 2019-08-20 10:08:10 +0000 |
commit | a53aa4da8add4e3adc6c38f70eb172d570865831 (patch) | |
tree | cfa58fd1a25efc17c3f14d6aab8881f7733eb150 /gcc | |
parent | dd241b945849cd66f122189d97d54d4a4d9e475a (diff) | |
download | gcc-a53aa4da8add4e3adc6c38f70eb172d570865831.zip gcc-a53aa4da8add4e3adc6c38f70eb172d570865831.tar.gz gcc-a53aa4da8add4e3adc6c38f70eb172d570865831.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/intrinsic.texi | 20 |
2 files changed, 18 insertions, 7 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 1f44776..3eca99e 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2019-08-20 Mark Eggleston <mark.eggleston@codethink.com> + + PR fortran/89236 + * intrinsic.texi: Add GNU extension notes to DIM, MOD, MODULO. + 2019-08-19 Mark Eggleston <mark.eggleston@codethink.com> * gfortran.texi: Delete paragraph about integer overload errors diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi index 3aa068d..31b97c4 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}: |