diff mbox series

[doc] Fix typos in MINLOC, MAXLOC documentation

Message ID 359bc5f2-9102-b021-dd45-a54075a757d3@foss.arm.com
State New
Headers show
Series [doc] Fix typos in MINLOC, MAXLOC documentation | expand

Commit Message

Kyrill Tkachov March 22, 2019, 4:42 p.m. UTC
Hi all,

I think there's a typo in the documentation of the MINLOC and MAXLOC 
intrinsics.
It implies that when the BACK argument is true it returns the first 
occurrence of the min/max value,
but my understanding is that it should return the last occurrence.

This patch fixes the documentation.

Ok for trunk?
Thanks,
Kyrill

2019-03-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * intrinsic.texi (MINLOC): Fix typo in BACK argument documentation.
     (MAXLOC): Likewise.

Comments

Thomas Koenig March 22, 2019, 11:01 p.m. UTC | #1
Hi Kyrill,

> I think there's a typo in the documentation of the MINLOC and MAXLOC 
> intrinsics.
> It implies that when the BACK argument is true it returns the first 
> occurrence of the min/max value,
> but my understanding is that it should return the last occurrence.
> 
> This patch fixes the documentation.
> 
> Ok for trunk?

OK.

Thanks for the patch!

Regards

	Thomas
diff mbox series

Patch

diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi
index 941c2e3937443f99821146d2f7e1281672c8f6fc..ee857c62c719cc9c4074248819dc16eef286bc2d 100644
--- a/gcc/fortran/intrinsic.texi
+++ b/gcc/fortran/intrinsic.texi
@@ -10111,8 +10111,8 @@  locations of the maximum element along each row of the array in the
 which @var{MASK} is @code{.TRUE.} are considered.  If more than one
 element in the array has the maximum value, the location returned is
 that of the first such element in array element order if the
-@var{BACK} is not present, or if it false; otherwise, the location
-returned is that of the first such element. If the array has zero
+@var{BACK} is not present, or is false; if @var{BACK} is true, the location
+returned is that of the last such element. If the array has zero
 size, or all of the elements of @var{MASK} are @code{.FALSE.}, then
 the result is an array of zeroes.  Similarly, if @var{DIM} is supplied
 and all of the elements of @var{MASK} along a given row are zero, the
@@ -10468,8 +10468,8 @@  locations of the minimum element along each row of the array in the
 which @var{MASK} is @code{.TRUE.} are considered.  If more than one
 element in the array has the minimum value, the location returned is
 that of the first such element in array element order if the
-@var{BACK} is not present, or if it false; otherwise, the location
-returned is that of the first such element.  If the array has
+@var{BACK} is not present, or is false; if @var{BACK} is true, the location
+returned is that of the last such element.  If the array has
 zero size, or all of the elements of @var{MASK} are @code{.FALSE.}, then
 the result is an array of zeroes.  Similarly, if @var{DIM} is supplied
 and all of the elements of @var{MASK} along a given row are zero, the