From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by sourceware.org (Postfix) with ESMTPS id C55E23858CDA; Tue, 13 Jun 2023 19:33:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C55E23858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1686684833; x=1687289633; i=anlauf@gmx.de; bh=xtKlJjKISO1paVQgUoMf8h6Vhwe0mvH4UvNddv6XzUo=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=rjOmttFHM9cT0CU7EhiFr02IsfVufeDhJJh/O93kTYF7ABBTNFxDqD2KfobXCAAdjtsVJb8 u7rPMiYTcWZ8YkSwK7rtNu7kOGvPdPkdNIl1naePW6pDOzXxnED7oX8dZIfAqzubhxcvHS2II Ecq8J9gKAe3c+mQ/jVCJfZCqdFZBBGjqST7zQetYQCqlohLQLHrtLuVJqwQw40+grQDkVTFXV KP/eLGyLhekoIrW7zdlsvMesfY3+RRSKAuwBLAe5h2JplrwWX1x6cIMeRPCXgsNQ4O27vac+g Ps6KSmXhEu9HoXVgCLZrHhL43QQr/YHGsp/XrPPdamlGKPmwyhZA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.178.29] ([79.232.146.57]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MNbkv-1qTk0A1lqF-00P7dQ; Tue, 13 Jun 2023 21:33:53 +0200 Message-ID: Date: Tue, 13 Jun 2023 21:33:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] Fortran: fix passing of zero-sized array arguments to procedures [PR86277] To: sgk@troutmask.apl.washington.edu, Harald Anlauf via Fortran Cc: gcc-patches Newsgroups: gmane.comp.gcc.patches,gmane.comp.gcc.fortran References: Content-Language: en-US From: Harald Anlauf In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Z7a83oKFqBzMqvs6LGoF5t909Pjf0cdUBtlZgXwi3myebUkgA1b qSOnYuuOyxzTtvJm99/7x/YKdFNcTs5Gjo7z+TyzXZ504cZxXNpu2mbJsobiGd2Z+6XLeUS MB5v3dUfCIKmI0pr7ZOgB/Bu6ifZ8YIw4BIEmC99tFBwuuwCMXWaJY1N/GL2ve+DBQhqMQ9 SqSiT00x8YBDmY0VF94fw== UI-OutboundReport: notjunk:1;M01:P0:q6IZK9WBVOg=;Yt8vk2X2TBnf3rnDt11d+7CzHe2 Ca5HGiMpzn4U5shUl9RBRPy4+hNmlSVdvBZAr5F8xhCtfa+jPBXvRype3xeTvT5bCUsjHUAYP KfKfbW35eNwsIzbA2j/bHkWCve9geZZFVABjmLjYHmSq/FzexJkieVxcAFb8hYz2KTOkp/hgq 0m0987uRsggpuxbamnZ22GY/2i1yGJcFXXCACt+tYKxEME6SZybpBf0FK4YhCSibVwfIVEwoE jrARdrN+udBDrAdnNZ0HbyFSFxWGngyujd2dqfbIh1Xz2+S8zrNcfjx4VTYHvzsR3YxmgIerK cJ0hRzfb8WgJPAzJgKwsKe5oIhY1Sw+p/cfgIV960J06EaRuPxL53pLVRHP663aEdPNhsB4Ck 2gWoENeNnUVuOI3MlyqiwH5V8dEwO92I3WYkJPPirFQqCpIuvffStK/QaD1y/c00lvZzqBl48 K+xRYRuvUfLRIuyWCQ1EpjDQOMIn1qWeTFuBB1WIUIOZE7YbscszQtaDqtq0yY0WBoO54ZmTR hglWbBmy9MaEVsgGoTqo6UPw1o4+j6QyICu42arRv17J4/Gh1uY3FCvXDImpSi3lKDiyqplGr gxFgnnBmO09RGBSyt3fBi6+QY62Q4TfLsu/aueRXoTjkeQyn/1rjtR+E5KmN7Q99t4YJYZepk LX2DElFWYD4VDN46PVeeMuTyHtEyMD+xHZ1fXhzLI2QCkoTcYoFf5H/HZrhioRNUXl7JFW4md 6jBk8N7H4pmSss842IcdhNOfafm7xjfjBj4LuNueIUany2OC8qaglaOmqpLSosIVWL9V2yQU0 ctXFBkITIDr9QOnIlQlZIGws1FVkk4vxDIguQYbvLEyfSkQW0dGcJX+uZJG8O6Uxq4d4iG62Q qMBHpcLaVd/jAY256ikwrUp6BRRGC1kaArI3dKYgkthtmVRIi2EsiUgMftei5wo+GBXx2lrgb xxXqcQNFeGftwsCc4fR4lWUoPOA= X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Steve, On 6/13/23 19:45, Steve Kargl via Gcc-patches wrote: > On Mon, Jun 12, 2023 at 11:12:45PM +0200, Harald Anlauf via Fortran wrot= e: >> Dear all, >> >> the attached - actually rather small - patch is the result of a >> rather intensive session with Mikael in an attempt to fix the >> situation that we did not create proper temporaries when passing >> zero-sized array arguments to procedures. When the dummy argument >> was declared as OPTIONAL, in many cases it was mis-detected as >> non-present. This also depended on the type of argument, and >> was different for different intrinsic types, notably character, >> and derived types, and should explain the rather large ratio of >> the size of the provided testcases to the actual fix... >> >> (What the patch does not address: we still generate too much code >> for unneeded temporaries, often two temporaries instead of just >> one. I'll open a separate PR to track this.) >> >> Regtested on x86_64-pc-linux-gnu. OK for mainline? >> >> If this survives long enough on 14-trunk, would this be eligible >> for a backport to 13-branch in time for 13.2? >> > > OK to commit. > > I've reviewed the bugzilla exchange between Mikael and you, > and agree with committing this and opening a new PR to > track the unneeded temporaries issue. this is tracked here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110241 Thanks for the review! Harald From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by sourceware.org (Postfix) with ESMTPS id 7F35E38582BE for ; Tue, 13 Jun 2023 19:34:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7F35E38582BE Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=m.gmane-mx.org Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1q99mB-000AGh-9G for gcc-patches@gcc.gnu.org; Tue, 13 Jun 2023 21:33:59 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gcc-patches@gcc.gnu.org From: Harald Anlauf Subject: Re: [PATCH] Fortran: fix passing of zero-sized array arguments to procedures [PR86277] Date: Tue, 13 Jun 2023 21:33:48 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US In-Reply-To: Cc: fortran@gcc.gnu.org X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_SHORT,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: Message-ID: <20230613193348.AmX4q2Jjwq_wuRpb8ciz9hndrc9kJjc4TQNpm_587NI@z> Hi Steve, On 6/13/23 19:45, Steve Kargl via Gcc-patches wrote: > On Mon, Jun 12, 2023 at 11:12:45PM +0200, Harald Anlauf via Fortran wrote: >> Dear all, >> >> the attached - actually rather small - patch is the result of a >> rather intensive session with Mikael in an attempt to fix the >> situation that we did not create proper temporaries when passing >> zero-sized array arguments to procedures. When the dummy argument >> was declared as OPTIONAL, in many cases it was mis-detected as >> non-present. This also depended on the type of argument, and >> was different for different intrinsic types, notably character, >> and derived types, and should explain the rather large ratio of >> the size of the provided testcases to the actual fix... >> >> (What the patch does not address: we still generate too much code >> for unneeded temporaries, often two temporaries instead of just >> one. I'll open a separate PR to track this.) >> >> Regtested on x86_64-pc-linux-gnu. OK for mainline? >> >> If this survives long enough on 14-trunk, would this be eligible >> for a backport to 13-branch in time for 13.2? >> > > OK to commit. > > I've reviewed the bugzilla exchange between Mikael and you, > and agree with committing this and opening a new PR to > track the unneeded temporaries issue. this is tracked here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110241 Thanks for the review! Harald