From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 , CC: Jakub Jelinek 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 Content-Type: multipart/mixed; boundary="=-=-=" 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: , X-List-Received-Date: Thu, 07 Jul 2022 08:38:01 -0000 --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 =3D 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 =3D 0; i < 10; i++) > + a[i] =3D 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 tr= anslation units|mkoffload returned 1 exit status" } */ OK to push the attached "Adjust 'libgomp.c-c++-common/requires-3.c'"? Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename="0001-Adjust-libgomp.c-c-common-requires-3.c.patch" >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 --=-=-=--