From patchwork Fri Mar 22 16:42:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kyrill Tkachov X-Patchwork-Id: 1061382 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-498316-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=foss.arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="eh5mbgLf"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44QqGb6fKGz9sCJ for ; Sat, 23 Mar 2019 03:43:16 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=g6FkrDI3/Gni+AtcHCIW9ScTrYnMJ60WFS+5IE1C2z+c9dQayb fjYjjYzN6szdJwDtABPTQ0OzAK2VB3ZpkPz8SiyTsV+2w5jptI6FBFBmCzcelIJn Zn6ezeJhDdo30trLmeWQk0vmUbcwpfmVn/Rhx2hUVVlUNfTqG4NcFhAss= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=edRJ2TrCG/BdpE86COXShpKjmg8=; b=eh5mbgLfg5bGjiIIbMpK 2eNsSAWYpVtT+p3x/tcGrZC7m7NXaxjTN+xfEV9G9zBKRF0Pb3ldvN6fw5CpDifF hFvv72jCWYUSBwz1dRYVu72ik17aSgYQvNmCPJSMf9okSHZTiSx1+UlGsQezw1PS PLiu7LsIRiyXy2dVVBePIco= Received: (qmail 101601 invoked by alias); 22 Mar 2019 16:43:01 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 101579 invoked by uid 89); 22 Mar 2019 16:43:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-13.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 22 Mar 2019 16:42:59 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D761FA78; Fri, 22 Mar 2019 09:42:57 -0700 (PDT) Received: from [10.2.206.47] (e120808-lin.cambridge.arm.com [10.2.206.47]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5F18E3F59C; Fri, 22 Mar 2019 09:42:57 -0700 (PDT) To: "gcc-patches@gcc.gnu.org" , fortran@gcc.gnu.org From: Kyrill Tkachov Subject: [PATCH][doc] Fix typos in MINLOC, MAXLOC documentation Message-ID: <359bc5f2-9102-b021-dd45-a54075a757d3@foss.arm.com> Date: Fri, 22 Mar 2019 16:42:55 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 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      * intrinsic.texi (MINLOC): Fix typo in BACK argument documentation.     (MAXLOC): Likewise. 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