From patchwork Mon Aug 19 09:11:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mark Eggleston X-Patchwork-Id: 1149136 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-507236-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=codethink.co.uk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="E+WrIccE"; 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 46Bp8W5kD2z9sMr for ; Mon, 19 Aug 2019 19:11:53 +1000 (AEST) 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=Hy3JLlFoL8VZJKvQ34ozcdpAhljdAIp/ur6R1od9Tn0FqlMaL7 vqxAx6qpm8aBm9fPqFYDkKcZzI5baZ/zmR0SH2kT85ze54AGDF3FIGWH/JWG+YPd T6gESKtvkUvgWlo1NCB37fTRauboJSK5eWEZvZObg0OzNp+bhz92cxWJM= 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=P2ZvJ2drRBikAng6VWLHc7+eHLE=; b=E+WrIccEJJu3KWt15Bvl qUpqwXY47LNrJlJiqTUAGioKuD1I50srSmjwmVe77ehhbbXFphNUt/4LB+Q1DcL5 SuECuOPpo5vhftXoDdDu4Y7kxsODja6hiT/inptOhze5fHEoKef4yo63E+EwY0lm blGWlzQLBwwO1MfuvZfab4k= Received: (qmail 93934 invoked by alias); 19 Aug 2019 09:11:46 -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 93912 invoked by uid 89); 19 Aug 2019 09:11:46 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_COUK, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.1 spammy=H*Ad:D*co.uk, largest X-HELO: imap1.codethink.co.uk Received: from imap1.codethink.co.uk (HELO imap1.codethink.co.uk) (176.9.8.82) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Aug 2019 09:11:44 +0000 Received: from [167.98.27.226] (helo=[10.35.6.226]) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1hzdhV-0001gJ-JP; Mon, 19 Aug 2019 10:11:41 +0100 To: gcc-patches , fortran From: Mark Eggleston Subject: [PATCH] Intrinsic documentation for DIM, MOD and MODULO. Message-ID: <39df95e3-79a7-c835-9d47-adc45be2bf22@codethink.co.uk> Date: Mon, 19 Aug 2019 10:11:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 The intrinsics DIM, MOD and MODULO can accept arguments of different kinds and return values with the larger of the two kinds. Notes to this effect have been added as they were missing from the documentation. Please find attached the patch. ChangeLog: gcc/fortran/ChangeLog     Mark Eggleston      PR fortran/89236     * intrinsic.texi: Add GNU extension notes to DIM, MOD, MODULO. From 4e527390271f8002f37b33262bd4b4f90ad2062a Mon Sep 17 00:00:00 2001 From: Mark Eggleston Date: Tue, 5 Feb 2019 16:38:10 +0000 Subject: [PATCH] Intrinsic documentation. --- gcc/fortran/intrinsic.texi | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi index 941c2e39374..4cb0ec8a4cd 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 @@ -10603,14 +10605,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 @@ -10674,11 +10678,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 @@ -12911,7 +12917,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}: -- 2.11.0