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 DA4C43858C50 for ; Mon, 19 Sep 2022 19:46:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DA4C43858C50 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 1oaMjE-0000Tp-EP for gcc-patches@gcc.gnu.org; Mon, 19 Sep 2022 21:46:52 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gcc-patches@gcc.gnu.org From: Harald Anlauf Subject: Re: [PATCH 09/10] fortran: Support clobbering of variable subreferences [PR88364] Date: Mon, 19 Sep 2022 21:46:47 +0200 Message-ID: <6ac60050-2298-df01-1345-d53c868ed5d9@gmx.de> References: <20220916202439.549820-1-mikael@gcc.gnu.org> <20220916202439.549820-10-mikael@gcc.gnu.org> <3edab734-f5bb-5557-ff98-b0ce47d7c510@orange.fr> <3ef8c5c4-35a1-fa60-2a2d-a7bb3fbd35fc@gmx.de> <9996bd59-9cf1-12df-faa5-7d546e5732f7@orange.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Content-Language: en-US In-Reply-To: <9996bd59-9cf1-12df-faa5-7d546e5732f7@orange.fr> Cc: fortran@gcc.gnu.org X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP 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: Message-ID: <20220919194647.Mo4Lb1PLwZ_lTVhZYgmkkrE9ybobE5w44WO6w_AzKgg@z> Am 18.09.22 um 22:55 schrieb Mikael Morin: > Le 18/09/2022 à 20:32, Harald Anlauf a écrit : >> >> Assumed shape will be on the easy side, >> while assumed size likely needs to be excluded for clobbering. >> > Isn’t it the converse that is true? > Assumed shape can be non-contiguous so have to be excluded, but assumed > size are contiguous, so valid candidates for clobbering. No? I really was referring here to *dummies*, as in the following example: program p integer :: a(4) a = 1 call sub (a(1), 2) print *, a contains subroutine sub (b, k) integer, intent(in) :: k integer, intent(out) :: b(*) ! integer, intent(out) :: b(k) if (k > 2) b(k) = k end subroutine sub end program p Assumed size (*) is just a contiguous hunk of memory of possibly unknown size, which can be zero. So you couldn't set a clobber for the a(1) actual argument. > No way, really, arrays are going to be a maze of complexity. Agreed.