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.133.124]) by sourceware.org (Postfix) with ESMTPS id 0A8EA385840F for ; Wed, 8 Jun 2022 07:59:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0A8EA385840F Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-540-EfZ2chgeNumGDd9gNI6cDA-1; Wed, 08 Jun 2022 03:59:08 -0400 X-MC-Unique: EfZ2chgeNumGDd9gNI6cDA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 73315801E67; Wed, 8 Jun 2022 07:59:08 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 14A4A492C3B; Wed, 8 Jun 2022 07:59:07 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 2587x35b3994249 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 8 Jun 2022 09:59:04 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 2587x3Dn3994248; Wed, 8 Jun 2022 09:59:03 +0200 Date: Wed, 8 Jun 2022 09:59:02 +0200 From: Jakub Jelinek To: Tobias Burnus Cc: fortran , gcc-patches Subject: Re: [Patch] OpenMP: Fortran - fix ancestor's requires reverse_offload check Message-ID: Reply-To: Jakub Jelinek References: <35ed17a9-2429-1428-2825-c4076321a068@codesourcery.com> MIME-Version: 1.0 In-Reply-To: <35ed17a9-2429-1428-2825-c4076321a068@codesourcery.com> X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Wed, 08 Jun 2022 07:59:11 -0000 On Wed, Jun 08, 2022 at 09:54:07AM +0200, Tobias Burnus wrote: > The OpenMP requires directive may only be placed in the specification part of > a program unit (except it happens via the USE of a module). > > But the target directive ancestor-requires-'reverse_offload' only checked > the current namespace. > > OK for mainline? > > Tobias > ----------------- > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 > OpenMP: Fortran - fix ancestor's requires reverse_offload check > > gcc/fortran/ > > * openmp.cc (gfc_match_omp_clauses): Check also parent namespace > for 'requires reverse_offload'. > > gcc/testsuite/ > > * gfortran.dg/gomp/target-device-ancestor-5.f90: New test. LGTM, thanks. Jakub