From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123]) by sourceware.org (Postfix) with ESMTPS id DB3D03857C41 for ; Mon, 28 Feb 2022 22:36:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DB3D03857C41 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orange.fr Authentication-Results: sourceware.org; spf=none smtp.mailfrom=orange.fr Received: from [192.168.1.17] ([86.253.179.215]) by smtp.orange.fr with ESMTPA id Oocnn3OJvu3WEOocnnvfWG; Mon, 28 Feb 2022 23:36:14 +0100 X-ME-Helo: [192.168.1.17] X-ME-Auth: MDU4MTIxYWM4YWI0ZGE4ZTUwZWZmNTExZmI2ZWZlMThkM2ZhYiE5OWRkOGM= X-ME-Date: Mon, 28 Feb 2022 23:36:14 +0100 X-ME-IP: 86.253.179.215 Message-ID: Date: Mon, 28 Feb 2022 23:36:13 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 From: Mikael Morin Subject: Re: [PATCH] openmp, fortran: Check that event handles passed to detach clauses are not arrays [PR104131] To: Jakub Jelinek Cc: Kwok Cheung Yeung , gscfq@t-online.de, Tobias Burnus , gcc-patches , fortran References: <383792f1-a5c7-af10-c603-2f1332336648@codesourcery.com> <3c2d161f-481a-b223-a855-cadee01a5679@orange.fr> <8981ebb8-7b8e-19d7-a3b3-ef5fce239c53@orange.fr> <907e1f89-4534-75e4-fdb8-a11da280e3d1@orange.fr> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, FREEMAIL_FROM, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Mon, 28 Feb 2022 22:36:17 -0000 Le 28/02/2022 à 22:37, Jakub Jelinek a écrit : > On Mon, Feb 28, 2022 at 09:45:10PM +0100, Mikael Morin wrote: >> Le 28/02/2022 à 21:37, Mikael Morin a écrit : >>> Maybe corank should be checked together with rank? >> >> Lesson learned today: expressions don’t have a corank. There is gfc_is_coindexed that can be used. >> Does pr104131-2.f90 really need to be rejected? > > OpenMP 5.2 says that detach clause should be treated as if it appears on a > firstprivate clause and for the privatization clauses says: > "A private variable must not be coindexed or appear as an actual argument to a procedure where > the corresponding dummy argument is a coarray." > 5.1 had the same restriction. > There is also: > A variable that is part of another variable (as an array element or a structure element) cannot > appear in a detach clause. which tells that the check should be on expr->ref instead of expr->sym->as or expr->rank. None of the above excerpts from the spec forbid pr104131.f90 or pr104131-2.f90 by the way.