From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cc-smtpout1.netcologne.de (cc-smtpout1.netcologne.de [IPv6:2001:4dd0:100:1062:25:2:0:1]) by sourceware.org (Postfix) with ESMTPS id A38AC386F022; Tue, 2 Feb 2021 14:54:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A38AC386F022 Received: from cc-smtpin1.netcologne.de (cc-smtpin1.netcologne.de [89.1.8.201]) by cc-smtpout1.netcologne.de (Postfix) with ESMTP id 3CF7F397CC; Tue, 2 Feb 2021 15:54:27 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cc-smtpin1.netcologne.de (Postfix) with ESMTP id 38B2511F1B; Tue, 2 Feb 2021 15:54:27 +0100 (CET) Received: from [2001:4dd7:5f0c:0:ebfe:ef2f:886e:a511] (helo=cc-smtpin1.netcologne.de) by localhost with ESMTP (eXpurgate 4.19.0) (envelope-from ) id 601967a3-031e-7f0000012729-7f000001ecde-1 for ; Tue, 02 Feb 2021 15:54:27 +0100 Received: from linux-p51k.fritz.box (2001-4dd7-5f0c-0-ebfe-ef2f-886e-a511.ipv6dyn.netcologne.de [IPv6:2001:4dd7:5f0c:0:ebfe:ef2f:886e:a511]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cc-smtpin1.netcologne.de (Postfix) with ESMTPSA; Tue, 2 Feb 2021 15:54:23 +0100 (CET) Subject: Re: [Patch] Fortran: Fix Array dependency with local coarrays [PR98913] (was: Re: A question about coarrays and -Warray-temporaries) To: Tobias Burnus , Jorge D'Elia , Gfortran List , gcc-patches References: <121178681.597.1612108263047.JavaMail.zimbra@intec.unl.edu.ar> <9d298701-38a5-c2c5-1daf-7a2dad754369@netcologne.de> <4fc42e9c-676d-f3fc-57ab-f665a679bfbb@codesourcery.com> From: Thomas Koenig Message-ID: <7098734c-32bb-a5d0-1e72-015e33321dc9@netcologne.de> Date: Tue, 2 Feb 2021 15:54:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <4fc42e9c-676d-f3fc-57ab-f665a679bfbb@codesourcery.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2021 14:54:35 -0000 Am 02.02.21 um 12:46 schrieb Tobias Burnus: > Hi all, > > the attached patch now handles -fcoarray=single and access to the local > image like no coarray access, using the same check a before. > > Actually, I think we could remove the if (..coarray..) check completely: > For 'single', it is like no coarrays; for 'lib' both AA[remote] =... and > "AA = ... AA[remove]" will create a function call and uses already > temporaries. I don't know what 'native'/'threads' does – but either it > the image index is different, then no temporary is needed at all – or it > is the same (in particular: this_image / not present), but then the > noncoarray analysis would work. That analysis is correct, also as far as the shared memory coarray goes (where you do offsets as an extra dimension, either it points to the same memory or to different memory). So, while your patch is OK, I think a simple removal of the test is also OK. Take your pick :-) Best regards Thomas