From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id CBAED3858403 for ; Tue, 1 Mar 2022 08:17:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CBAED3858403 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-515-xdAcamQoMcGTFJHuSs_cew-1; Tue, 01 Mar 2022 03:16:57 -0500 X-MC-Unique: xdAcamQoMcGTFJHuSs_cew-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D3FBF814600; Tue, 1 Mar 2022 08:16:55 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.99]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9DD9183163; Tue, 1 Mar 2022 08:16:54 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 2218Gogj277095 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 1 Mar 2022 09:16:51 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 2218GmCQ277094; Tue, 1 Mar 2022 09:16:48 +0100 Date: Tue, 1 Mar 2022 09:16:48 +0100 From: Jakub Jelinek To: Tobias Burnus Cc: Mikael Morin , gscfq@t-online.de, Kwok Cheung Yeung , gcc-patches , fortran Subject: Re: [PATCH] openmp, fortran: Check that event handles passed to detach clauses are not arrays [PR104131] Message-ID: Reply-To: Jakub Jelinek 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> <65456330-dc81-0647-3bdb-6d409554136d@codesourcery.com> MIME-Version: 1.0 In-Reply-To: <65456330-dc81-0647-3bdb-6d409554136d@codesourcery.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2022 08:17:01 -0000 On Tue, Mar 01, 2022 at 08:58:54AM +0100, Tobias Burnus wrote: > The wording actually also permits array sections. But contrary to coarrays, > (which are odd but otherwise fine), I think it does not really make sense > to have arrays and array sections here. > > (Do we need/want to get this clarified/changed in spec?) In 5.2 we have: "A variable that is part of another variable (as an array element or a structure element) cannot appear in a detach clause." and "An array section can appear only in clauses for which it is explicitly allowed." and C/C++ "A variable of OpenMP type is a variable of type omp__t." and Fortran "A variable of OpenMP type is a scalar integer variable of kind omp__kind." and "event-handle variable of event_handle type default" As there is no explicit allowing of array sections, array sections aren't allowed in detach, and it must be scalar integer. The question is if a non-coindexed coarray is a scalar integer variable or not. Jakub