From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112331 invoked by alias); 23 Jun 2015 12:38:35 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 112318 invoked by uid 89); 23 Jun 2015 12:38:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 23 Jun 2015 12:38:33 +0000 Received: from svr-orw-fem-06.mgc.mentorg.com ([147.34.97.120]) by relay1.mentorg.com with esmtp id 1Z7NTB-00038c-Av from James_Norris@mentor.com for gcc-patches@gcc.gnu.org; Tue, 23 Jun 2015 05:38:29 -0700 Received: from [172.30.80.204] (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.3.224.2; Tue, 23 Jun 2015 05:38:28 -0700 Message-ID: <55895342.1030109@mentor.com> Date: Tue, 23 Jun 2015 12:48:00 -0000 From: James Norris User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: , Thomas Schwinge Subject: [gomp4] Additional testing for deviceptr clause. Content-Type: multipart/mixed; boundary="------------000400090409050100050009" X-SW-Source: 2015-06/txt/msg01544.txt.bz2 --------------000400090409050100050009 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 122 Hi! The following patch adds additional testing of the deviceptr clause. Patch applied to gomp-4_0-branch. Thanks! Jim --------------000400090409050100050009 Content-Type: text/x-patch; name="test.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="test.patch" Content-length: 664 diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/deviceptr-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/deviceptr-1.c index e271a37..e62c315 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/deviceptr-1.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/deviceptr-1.c @@ -28,5 +28,26 @@ int main (void) abort (); #endif + a_1 = a_2 = 0; + +#pragma acc data deviceptr (a) +#pragma acc parallel copyout (a_1, a_2) + { + a_1 = a; + a_2 = &a; + } + + if (a != A) + abort (); + if (a_1 != a) + abort (); +#if ACC_MEM_SHARED + if (a_2 != &a) + abort (); +#else + if (a_2 == &a) + abort (); +#endif + return 0; } --------------000400090409050100050009--