From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8938 invoked by alias); 16 Mar 2015 18:42:12 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 8924 invoked by uid 89); 16 Mar 2015 18:42:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-qc0-f173.google.com Received: from mail-qc0-f173.google.com (HELO mail-qc0-f173.google.com) (209.85.216.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 16 Mar 2015 18:42:09 +0000 Received: by qcaz10 with SMTP id z10so52465643qca.1 for ; Mon, 16 Mar 2015 11:42:07 -0700 (PDT) X-Received: by 10.140.98.227 with SMTP id o90mr75762215qge.96.1426531327532; Mon, 16 Mar 2015 11:42:07 -0700 (PDT) Received: from msticlxl57.ims.intel.com ([192.55.55.41]) by mx.google.com with ESMTPSA id f123sm7944792qhc.41.2015.03.16.11.42.03 (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Mar 2015 11:42:06 -0700 (PDT) Date: Mon, 16 Mar 2015 18:42:00 -0000 From: Ilya Verbin To: Jakub Jelinek Cc: gcc@gcc.gnu.org, Kirill Yukhin Subject: Re: [gomp4] Questions about "declare target" and "target update" pragmas Message-ID: <20150316184153.GA42550@msticlxl57.ims.intel.com> References: <20140122155151.GA50489@msticlxl57.ims.intel.com> <20150310165252.GC37666@msticlxl57.ims.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150310165252.GC37666@msticlxl57.ims.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00198.txt.bz2 On Tue, Mar 10, 2015 at 19:52:52 +0300, Ilya Verbin wrote: > Hi Jakub, > > I have one more question :) > This testcase seems to be correct... or not? > > #pragma omp declare target > extern int G; > #pragma omp end declare target > > int G; > > int main () > { > #pragma omp target update to(G) > > return 0; > } > > If yes, then we have a problem that the decl of G in varpool_node::get_create > doesn't have "omp declare target" attribute. Ping? I am investigating run-fails on some benchmark, and have found a second questionable place, where a function argument overrides a global array. Just to be sure, is this a bug in the test? #pragma omp declare target int a1[50], a2[50]; #pragma omp end declare target void foo (int a1[]) { #pragma omp target { a1[10]++; a2[10]++; } } int main () { a1[10] = a2[10] = 10; #pragma omp target update to(a1, a2) foo (a1); #pragma omp target update from(a1, a2) if (a1[10] != a2[10]) abort (); return 0; } Thanks, -- Ilya