From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3071 invoked by alias); 17 Oct 2014 15:17:44 -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 3061 invoked by uid 89); 17 Oct 2014 15:17:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f180.google.com Received: from mail-ig0-f180.google.com (HELO mail-ig0-f180.google.com) (209.85.213.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 17 Oct 2014 15:17:42 +0000 Received: by mail-ig0-f180.google.com with SMTP id uq10so1056506igb.1 for ; Fri, 17 Oct 2014 08:17:39 -0700 (PDT) X-Received: by 10.107.34.199 with SMTP id i190mr9772858ioi.4.1413559059857; Fri, 17 Oct 2014 08:17:39 -0700 (PDT) Received: from msticlxl57.ims.intel.com (fmdmzpr04-ext.fm.intel.com. [192.55.55.39]) by mx.google.com with ESMTPSA id p62sm744301ioe.33.2014.10.17.08.17.36 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Oct 2014 08:17:39 -0700 (PDT) Date: Fri, 17 Oct 2014 15:18:00 -0000 From: Ilya Verbin To: Jakub Jelinek Cc: gcc-patches@gcc.gnu.org, Bernd Schmidt , Thomas Schwinge , Kirill Yukhin , Andrey Turetskiy Subject: Re: [PATCH 7/n] OpenMP 4.0 offloading infrastructure: testsuite Message-ID: <20141017151731.GC28310@msticlxl57.ims.intel.com> References: <20141015145752.GB46277@msticlxl57.ims.intel.com> <20141015150543.GR10376@tucnak.redhat.com> <20141015152837.GC46277@msticlxl57.ims.intel.com> <20141015153518.GS10376@tucnak.redhat.com> <20141017140211.GA28310@msticlxl57.ims.intel.com> <20141017141455.GY10376@tucnak.redhat.com> <20141017145817.GB28310@msticlxl57.ims.intel.com> <20141017151054.GC10376@tucnak.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141017151054.GC10376@tucnak.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg01749.txt.bz2 On 17 Oct 17:10, Jakub Jelinek wrote: > On Fri, Oct 17, 2014 at 06:58:17PM +0400, Ilya Verbin wrote: > > Here in the original test you have: > > > > #pragma omp target if (v <= 1) > > if (omp_get_level () != 0 || (f && !omp_is_initial_device ())) > > abort (); > > #pragma omp target device (d) if (v <= 1) > > if (omp_get_level () != 0 || (f && !omp_is_initial_device ())) > > abort (); > > > > There are 2 same if-statements, but target pragmas have different clauses. > > The second depends on device (d), and (f && !omp_is_initial_device ()) works > > fine. But the first one doesn't depend on 'f', and if we have offload device, > > this check will fail. > > > > So, to have this test working both with offloading and fallback, we need to > > remove all pragmas without device-clause. > > Well, there is no need to remove them, just the " || (f && !omp_is_initial_device ())" > should be dropped from target regions without device (d) on them. > Where there is no f && guard, the condition should stay. > Do you agree? Yes, should I re-post the patch? -- Ilya