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 A713A3858D32 for ; Mon, 17 Oct 2022 11:59:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A713A3858D32 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.95,191,1661846400"; d="scan'208,223";a="84973654" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 17 Oct 2022 03:59:55 -0800 IronPort-SDR: KbcbZHOKcpuJPYIeAaJQEf8y0Uqrhp8eJbhrk4R9ZwDiG1IUbu8iZ4eCoHTCvDJ3J2+iOKx+Td PXSxeTjlPsCFspKMzYfsG6Jf/314Gq2aRJaxETcU1+bVirTR+MQJ4axQKOtiJa77Bce1oDMP5m mWPm5nOVi0vHUOQtDLu1QSUYqoHDhHCdxbym8wMmSBwe228u7khHWMhibOs0+k5c85KSgkf8G+ stbOtQFX4zeY5GtydYxYv/oP9r6BjHW+3klnE6HHCp13DqMxvHXMlng/P/5XmeEG3AsSGsH3Cc hD8= From: Thomas Schwinge To: Tobias Burnus , CC: Jakub Jelinek Subject: Fix nvptx-specific '-foffload-options' syntax in 'libgomp.c/reverse-offload-sm30.c' (was: [Patch] nvptx/mkoffload.cc: Warn instead of error when reverse offload is not possible) In-Reply-To: References: <40563a1c-49ef-a185-3c01-9f717cd48fc5@codesourcery.com> <8301889b-64f9-8c60-15ca-2fa1fc495791@codesourcery.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Mon, 17 Oct 2022 13:59:49 +0200 Message-ID: <875ygiirt6.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=-11.8 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_LOTSOFHASH,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi! On 2022-09-12T14:02:16+0200, Tobias Burnus wrote: > --- /dev/null > +++ b/libgomp/testsuite/libgomp.c/reverse-offload-sm30.c > @@ -0,0 +1,15 @@ > +/* { dg-do link { target { offload_target_nvptx } } } */ > +/* { dg-additional-options "-foffload-options=3Dnvptx-none=3D-march=3Dsm= _30 -foffload=3D-mptx=3D_" } */ Pushed to master branch commit b61796663ba1fe8fb83203829398f3f89ec212b7 "Fix nvptx-specific '-foffload-options' syntax in 'libgomp.c/reverse-offload-sm30.c'", see attached. Cherry-picked pushed to devel/omp/gcc-12 branch in commit f36ce95ad928578aa6739f61480e6c8fbaf2248e "Fix nvptx-specific '-foffload-options' syntax in 'libgomp.c/reverse-offload-sm30.c'", see attached. Gr=C3=BC=C3=9Fe Thomas > + > +#pragma omp requires reverse_offload > + > +int > +main () > +{ > + #pragma omp target > + { > + } > + return 0; > +} > + > +/* { dg-warning "'omp requires reverse_offload' requires at least 'sm_35= ' for '-march=3D' - disabling offload-code generation for this device type"= "" { target *-*-* } 0 } */ ----------------- 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-Fix-nvptx-specific-foffload-options-syntax-in-libgom.patch" >From b61796663ba1fe8fb83203829398f3f89ec212b7 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 23 Sep 2022 11:29:50 +0200 Subject: [PATCH] Fix nvptx-specific '-foffload-options' syntax in 'libgomp.c/reverse-offload-sm30.c' That is, '-mptx=_' is only valid in '-foffload-options=nvptx-none', too. Fix test case added in recent commit r13-2625-g6b43f556f392a7165582aca36a19fe7389d995b2 "nvptx/mkoffload.cc: Warn instead of error when reverse offload is not possible". libgomp/ * testsuite/libgomp.c/reverse-offload-sm30.c: Fix nvptx-specific '-foffload-options' syntax. --- libgomp/testsuite/libgomp.c/reverse-offload-sm30.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgomp/testsuite/libgomp.c/reverse-offload-sm30.c b/libgomp/testsuite/libgomp.c/reverse-offload-sm30.c index fbfeae1fd41..7f10fd4ded9 100644 --- a/libgomp/testsuite/libgomp.c/reverse-offload-sm30.c +++ b/libgomp/testsuite/libgomp.c/reverse-offload-sm30.c @@ -1,5 +1,5 @@ /* { dg-do link { target { offload_target_nvptx } } } */ -/* { dg-additional-options "-foffload-options=nvptx-none=-march=sm_30 -foffload=-mptx=_" } */ +/* { dg-additional-options "-foffload-options=nvptx-none=-march=sm_30 -foffload-options=nvptx-none=-mptx=_" } */ #pragma omp requires reverse_offload -- 2.35.1 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename="0001-Fix-nvptx-specific-foffload-options-syntax-in-l.og12.patch" >From f36ce95ad928578aa6739f61480e6c8fbaf2248e Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 23 Sep 2022 11:29:50 +0200 Subject: [PATCH] Fix nvptx-specific '-foffload-options' syntax in 'libgomp.c/reverse-offload-sm30.c' That is, '-mptx=_' is only valid in '-foffload-options=nvptx-none', too. Fix test case added in recent commit r13-2625-g6b43f556f392a7165582aca36a19fe7389d995b2 "nvptx/mkoffload.cc: Warn instead of error when reverse offload is not possible". libgomp/ * testsuite/libgomp.c/reverse-offload-sm30.c: Fix nvptx-specific '-foffload-options' syntax. (cherry picked from commit b61796663ba1fe8fb83203829398f3f89ec212b7) --- libgomp/ChangeLog.omp | 8 ++++++++ libgomp/testsuite/libgomp.c/reverse-offload-sm30.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index cb3541be378..048314eb1be 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,3 +1,11 @@ +2022-10-17 Thomas Schwinge + + Backported from master: + 2022-10-17 Thomas Schwinge + + * testsuite/libgomp.c/reverse-offload-sm30.c: Fix nvptx-specific + '-foffload-options' syntax. + 2022-10-14 Julian Brown * testsuite/libgomp.oacc-fortran/declare-1.f90: Adjust scan output. diff --git a/libgomp/testsuite/libgomp.c/reverse-offload-sm30.c b/libgomp/testsuite/libgomp.c/reverse-offload-sm30.c index fbfeae1fd41..7f10fd4ded9 100644 --- a/libgomp/testsuite/libgomp.c/reverse-offload-sm30.c +++ b/libgomp/testsuite/libgomp.c/reverse-offload-sm30.c @@ -1,5 +1,5 @@ /* { dg-do link { target { offload_target_nvptx } } } */ -/* { dg-additional-options "-foffload-options=nvptx-none=-march=sm_30 -foffload=-mptx=_" } */ +/* { dg-additional-options "-foffload-options=nvptx-none=-march=sm_30 -foffload-options=nvptx-none=-mptx=_" } */ #pragma omp requires reverse_offload -- 2.35.1 --=-=-=--