From patchwork Thu Jul 7 08:37:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 55811 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 99D693857B9C for ; Thu, 7 Jul 2022 08:38:29 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 7FB4F3856DD0 for ; Thu, 7 Jul 2022 08:37:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7FB4F3856DD0 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.92,252,1650960000"; d="scan'208,223";a="78440207" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 07 Jul 2022 00:37:58 -0800 IronPort-SDR: PA31SGr3qJqjM8m+M0CPuxtIuAfv7o5EutM+fetrDGuKxdAr0EjI+bMJ+0hRCxCCYZYgKdsftS DrMjOR5+G/vdwa9pBPC4wsVI3Tas0Ui5gTwAV3Q/PHJL+1/JQRbGFyEDNVR+2U5ZO/qBESIt8P ylOfxwcZG7OIV463l+db1HxQIbXJjOizO2duitAQWIIRC9idvKnYKK96JCd8q5HMer5Ii8wy/M Ph4zXGKv2SPosGZmvPdpSXkvjQEeu0aoK/BCkvKocyiCGXpTvNGy4dcas8Wx1atx+3CVQZFLZK ZPo= From: Thomas Schwinge To: Tobias Burnus , Subject: Adjust 'libgomp.c-c++-common/requires-3.c' (was: [Patch][v4] OpenMP: Move omp requires checks to libgomp) In-Reply-To: <5576fa00-0ddd-8046-17c1-d1cea82bdcf5@codesourcery.com> References: <07fec82a-41cf-fdc5-6307-c068dd95ef1a@mentor.com> <7f9c91c1-a479-f94f-ac14-1d6827ce671b@codesourcery.com> <5576fa00-0ddd-8046-17c1-d1cea82bdcf5@codesourcery.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Thu, 7 Jul 2022 10:37:49 +0200 Message-ID: <87o7y148te.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, 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: 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: , Cc: Jakub Jelinek Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi! In preparation for other changes: On 2022-06-29T16:33:02+0200, Tobias Burnus wrote: > --- /dev/null > +++ b/libgomp/testsuite/libgomp.c-c++-common/requires-3-aux.c > @@ -0,0 +1,11 @@ > +/* { dg-skip-if "" { *-*-* } } */ > + > +#pragma omp requires unified_address > + > +int x; > + > +void foo (void) > +{ > + #pragma omp target > + x = 1; > +} > --- /dev/null > +++ b/libgomp/testsuite/libgomp.c-c++-common/requires-3.c > @@ -0,0 +1,24 @@ > +/* { dg-do link { target offloading_enabled } } */ Not expected to see 'offloading_enabled' here... > +/* { dg-additional-sources requires-3-aux.c } */ > + > +/* Check diagnostic by device-compiler's lto1. ..., because of this note ^. > + Other file uses: 'requires unified_address'. */ > + > +#pragma omp requires unified_address,unified_shared_memory > + > +int a[10]; > +extern void foo (void); > + > +int > +main (void) > +{ > + #pragma omp target > + for (int i = 0; i < 10; i++) > + a[i] = 0; > + > + foo (); > + return 0; > +} > + > +/* { dg-error "OpenMP 'requires' directive with non-identical clauses in multiple compilation units: 'unified_address, unified_shared_memory' vs. 'unified_address'" "" { target *-*-* } 0 } */ > +/* { dg-excess-errors "Ignore messages like: errors during merging of translation units|mkoffload returned 1 exit status" } */ OK to push the attached "Adjust 'libgomp.c-c++-common/requires-3.c'"? Grüße Thomas ----------------- 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 From 6a4031b351680bdbfe3cdb9ac4e4a3aa59e4ca84 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 7 Jul 2022 09:59:45 +0200 Subject: [PATCH] Adjust 'libgomp.c-c++-common/requires-3.c' As documented, this one does "Check diagnostic by device-compiler's lto1". Indeed there are none when compiling with '-foffload=disable' with an offloading-enabled compiler, so we should use 'offload_target_[...]', as used in other similar test cases. Follow-up to recent commit 683f11843974f0bdf42f79cdcbb0c2b43c7b81b0 "OpenMP: Move omp requires checks to libgomp". libgomp/ * testsuite/libgomp.c-c++-common/requires-3.c: Adjust. --- libgomp/testsuite/libgomp.c-c++-common/requires-3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgomp/testsuite/libgomp.c-c++-common/requires-3.c b/libgomp/testsuite/libgomp.c-c++-common/requires-3.c index 4b07ffdd09b..7091f400ef0 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/requires-3.c +++ b/libgomp/testsuite/libgomp.c-c++-common/requires-3.c @@ -1,4 +1,4 @@ -/* { dg-do link { target offloading_enabled } } */ +/* { dg-do link { target { offload_target_nvptx || offload_target_amdgcn } } } */ /* { dg-additional-sources requires-3-aux.c } */ /* Check diagnostic by device-compiler's lto1. -- 2.35.1