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