From patchwork Fri May 22 22:16:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Brown X-Patchwork-Id: 1296483 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49TLZX5zvyz9sPK for ; Sat, 23 May 2020 08:22:12 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0DCB03984010; Fri, 22 May 2020 22:21:36 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id D1D12386F824 for ; Fri, 22 May 2020 22:21:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D1D12386F824 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Julian_Brown@mentor.com IronPort-SDR: q2ujycTYFGc3JraPaMf888UgC17i7L0cFhhAFxqBNje5ahGQ6QV0TfH0dzjWJl/H3w4CSt8oFl TEkssNFspOIdN2pjfa98Mv6ss8flAUP6uoHauIUmhV/M+tBJSMN5jVkFR+EUfExVhovcMo2jnA MKCIXgBP5dBPVgWSIKtNmjjMPNw5QyUxuxw+073sOOwF4Q3/GSYpTVOFpWnBluCXnU23Zs3Olm OrMtfW1qoWe+qrup1r3qBNRdim+UMWjlY1f1EshDVL+s5rfpE1WxP4mGCYY856U5jlxHeM4wxl /D0= X-IronPort-AV: E=Sophos;i="5.73,423,1583222400"; d="scan'208";a="49127040" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 22 May 2020 14:21:29 -0800 IronPort-SDR: M0EWEvVK3pyAlsZ+arXnF6rTfBatHuNtQD5DjsE49Lsu3NUQ6Gsr2hPDV5PJO5FmcAUn0mjlpP 0cx0ZBjVrH8zasPcoz7ElgCPCII1ZKQb9gR23XMRBKAFBLf8E37mhydQwrf1acIYeoMSAWXvqP d3fwYt4VclZjh6COVzXoHhzmEwBc8Rhlz5MZPQLA1xqOEz1/yBBc4Q4NCIStqciQLTImP7b+Qq hhPSWUiur6WjRNXFG2TsDVKhDQXoplb41sHR02e429jqAb4Qd92O6/Wl48oz/oFe/Oh1HA0fDN ABk= From: Julian Brown To: Subject: [PATCH 4/7] [OpenACC] Fix incompatible copyout for acc_map_data (PR92843) Date: Fri, 22 May 2020 15:16:07 -0700 Message-ID: <7b2f54faa0a25a7a445ad86bf4726202a1190a4f.1590182783.git.julian@codesourcery.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Catherine_Moore@mentor.com, jakub@redhat.com, thomas@codesourcery.com Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" This patch provides a bug fix (on top of previous patches in this series) that allows the PR92843 test case to pass. Data mapped in with "acc_map_data" is not copied out by an "exit data" directive. OK? Julian ChangeLog PR libgomp/92843 libgomp/ * oacc-mem.c (goacc_exit_data_internal): Don't copyout data mapped with acc_map_data in exit data directive. --- libgomp/oacc-mem.c | 1 + libgomp/testsuite/libgomp.oacc-c-c++-common/pr92843-1.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/libgomp/oacc-mem.c b/libgomp/oacc-mem.c index 20d241382a8..c2b4a131a5f 100644 --- a/libgomp/oacc-mem.c +++ b/libgomp/oacc-mem.c @@ -1230,6 +1230,7 @@ goacc_exit_data_internal (struct gomp_device_descr *acc_dev, size_t mapnum, } if (copyfrom + && n->refcount != REFCOUNT_INFINITY && (kind != GOMP_MAP_FROM || n->refcount == 0)) gomp_copy_dev2host (acc_dev, aq, (void *) cur_node.host_start, (void *) (n->tgt->tgt_start + n->tgt_offset diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr92843-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr92843-1.c index f16c46a37bf..db5b35b08d9 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr92843-1.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr92843-1.c @@ -1,7 +1,6 @@ /* Verify that 'acc_copyout' etc. is a no-op if there's still a structured reference count. */ -/* { dg-xfail-run-if "TODO PR92843" { *-*-* } } */ /* { dg-skip-if "" { *-*-* } { "*" } { "-DACC_MEM_SHARED=0" } } */ #include