From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by sourceware.org (Postfix) with ESMTPS id 65756385842A; Tue, 31 Aug 2021 06:09:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 65756385842A Received: by mail-lf1-x131.google.com with SMTP id c8so23593438lfi.3; Mon, 30 Aug 2021 23:09:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IaoVEaPlf/SpFX5LGYwoFkcaqGAeSixL4DJdA1tgGTY=; b=No18u5Z3Re+bV9uppfNvf6G/Z5F8VgOIEWUDZsNR50IeoZhCvkkO7bONWK55eD5aOa cT2ofeDqljJCh2jEPuNrWvJEDVmiuzwMthufeb98u8xcYdOdvSLS1eezt96A5aEHkq5h GmRrr+ga8SSDm7Uc1zUgPBOsd8xV34qCB0Nv5Bl/4Y2qnclWecRojUh3xSvPqud+GNdk +ZVmGKfOziWJ78n4M79atJWgfZZaFBxoQUhNXeEGdjkgDNAfYfHgV6fvRAOWbj//WVLU EPwDiF6H7ddc7zwC6n6q+qo02MbZu+mIHNNFq6o0StzLLLoW2/hHBcu7MDKBFQMSDJmE W86A== X-Gm-Message-State: AOAM533Ayv/dFTh3MWhV0UjRNLiaIgrNaIOYfYZE2ANuO9WFQGeWB0WP MbSK9PNhG/vmFE+oasyeM6lZ6SfI6ZpCYa7RImg= X-Google-Smtp-Source: ABdhPJzaDih9WUsXfng3tdAOoAX3F1ORSS9kqeaXrYKj9COVxwqrsD/JrpPZzk0TXsfNEyx7CPe2SQ1xxA3eVGcKK3M= X-Received: by 2002:a05:6512:2207:: with SMTP id h7mr21085853lfu.44.1630390187970; Mon, 30 Aug 2021 23:09:47 -0700 (PDT) MIME-Version: 1.0 References: <119054fd-67a0-5e90-718f-2a83f5a59020@net-b.de> In-Reply-To: <119054fd-67a0-5e90-718f-2a83f5a59020@net-b.de> From: Paul Richard Thomas Date: Tue, 31 Aug 2021 07:09:36 +0100 Message-ID: Subject: =?UTF-8?B?UmU6ICpQSU5HKioyIOKAkyBSZTogW1BhdGNoXSBGb3J0cmFuOiBGaXggQmluZChDKSBjaA==?= =?UTF-8?B?YXItbGVuIGNoZWNrLCBhZGQgcHRyLWNvbnRpZ3VvdXMgY2hlY2s=?= To: Tobias Burnus Cc: gcc-patches , fortran , Tobias Burnus X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 06:09:52 -0000 Hi Tobias, s/However, as argument they are also iteroperable/However, as an argument they are also interoperable/ s/ /* else: valid only sind F2018 - and an assumed-shape/rank array; however, gfc_notify_std is already called when those array type are used. Thus, silently accept F200x. */ / /* else: valid only since F2018 - and an assumed-shape/rank array; however, gfc_notify_std is already called when those array types are used. Thus, silently accept F200x. */ Apart from those nits, it looks good to me. It even regtests OK :-) Thanks for sorting out the standard-ese. OK for mainline and, I would suggest 11-branch. Cheers Paul On Sun, 29 Aug 2021 at 08:35, Tobias Burnus wrote: > PING**2 > > On 25.08.21 20:58, Tobias Burnus wrote: > > Early *PING*. > > (I also should still review several Fortan patches... There are lots of > > patches waiting for review :-/) > > > > On 20.08.21 19:24, Tobias Burnus wrote: > >> The following is about interoperability (BIND(C)) only. > >> > >> > >> * The patch adds a missing check for pointer + contiguous. > >> (Rejected to avoid copy-in issues? Or checking issues?) > >> > >> > >> * And it corrects an issue regarding len > 1 characters. While > >> > >> subroutine foo(x) > >> character(len=3D2) :: x(*) > >> > >> is valid Fortran code (the argument can be "abce" or ['a','b','c','d'] > >> or ...) > >> =E2=80=93 and would work also with bind(C) as the len=3D2 does not nee= d to be > >> passed > >> as hidden argument as len is a constant. > >> However, it is not valid nonetheless. > >> > >> > >> OK? Comments? > >> > >> Tobias > >> > >> > >> PS: Referenced locations in the standard (F2018): > >> > >> C1554 If proc-language-binding-spec is specified for a procedure, > >> each of its dummy arguments shall be an interoperable procedure (18.3.= 6) > >> or a variable that is interoperable (18.3.4, 18.3.5), assumed-shape, > >> assumed-rank, assumed-type, of type CHARACTER with assumed length, > >> or that has the ALLOCATABLE or POINTER attribute. > >> > >> 18.3.1: "... If the type is character, the length type parameter is > >> interoperable if and only if its value is one. ..." > >> > >> "18.3.4 Interoperability of scalar variables": > >> "... A named scalar Fortran variable is interoperable ... if it > >> is of type character12its length is not assumed or declared by > >> an expression that is not a constant expression." > >> > >> 18.3.5: Likewise but for arrays. > >> > >> 18.3.6 "... Fortran procedure interface is interoperable with a C > >> function prototype ..." > >> "(5) any dummy argument without the VALUE attribute corresponds > >> to a formal parameter of the prototype that is of a pointer type, > >> and either > >> =E2=80=A2 the dummy argument is interoperable with an entity of t= he > >> referenced type ..." > >> (Remark: those are passed as byte stream) > >> "=E2=80=A2 the dummy argument is a nonallocatable nonpointer vari= able of > >> type > >> CHARACTER with assumed character length and the formal > >> parameter is > >> a pointer to CFI_cdesc_t, > >> =E2=80=A2 the dummy argument is allocatable, assumed-shape, > >> assumed-rank, or > >> a pointer without the CONTIGUOUS attribute, and the formal > >> parameter > >> is a pointer to CFI_cdesc_t, or > >> (Remark: those two use an array descriptor, also for > >> explicit-size/assumed-size > >> arrays or for scalars.) > >> =E2=80=A2 the dummy argument is assumed-type ..." > >> > > ----------------- > > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe > > 201, 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; > > Gesch=C3=A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der= Gesellschaft: > > M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955 > --=20 "If you can't explain it simply, you don't understand it well enough" - Albert Einstein