From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.smtpout.orange.fr (smtp-22.smtpout.orange.fr [80.12.242.22]) by sourceware.org (Postfix) with ESMTPS id 19A833858D26 for ; Sun, 30 Oct 2022 20:32:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 19A833858D26 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orange.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=orange.fr Received: from [192.168.1.17] ([86.215.174.255]) by smtp.orange.fr with ESMTPA id pEyfoYq0zAOp2pEyfo6xIK; Sun, 30 Oct 2022 21:32:18 +0100 X-ME-Helo: [192.168.1.17] X-ME-Auth: bW9yaW4tbWlrYWVsQG9yYW5nZS5mcg== X-ME-Date: Sun, 30 Oct 2022 21:32:18 +0100 X-ME-IP: 86.215.174.255 Message-ID: Date: Sun, 30 Oct 2022 21:32:17 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [PATCH] Fortran: ordering of hidden procedure arguments [PR107441] Content-Language: fr From: Mikael Morin To: Harald Anlauf , fortran , gcc-patches References: <7d8ddf07-e66d-2678-de99-0e575c70ea17@orange.fr> In-Reply-To: <7d8ddf07-e66d-2678-de99-0e575c70ea17@orange.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Le 30/10/2022 à 20:23, Mikael Morin a écrit : > > I think some discrepancy remains, as gfc_conv_procedure_call accumulates > coarray stuff into the stringargs, while your change accumulates the > associated parameter decls separately into hidden_arglist.  It's not > completely clear to me whether it is really problematic (string length > and coarray metadata are both integers anyway), but I suspect it is. > > I will see whether I can manage to exhibit testcases for these issues. > Here is a -fcoarray=lib example. It can be placed in gfortran/coarray. ! { dg-do run } ! ! PR fortran/107441 ! Check that with -fcoarray=lib, coarray metadata arguments are passed ! in the right order to procedures. program p integer :: ci[*] ci = 17 call s(1, ci, "abcd") contains subroutine s(ra, ca, c) integer :: ra, ca[*] character(*) :: c ca[1] = 13 if (ra /= 1) stop 1 if (this_image() == 1) then if (ca /= 13) stop 2 else if (ca /= 17) stop 3 end if if (len(c) /= 4) stop 4 if (c /= "abcd") stop 5 end subroutine s end program p