From patchwork Thu Oct 9 16:32:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 398083 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 654E9140080 for ; Fri, 10 Oct 2014 03:32:49 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; q=dns; s=default; b=Y+2/tGuB8qFoms54 gz+FtX4tsB46WrzpITBOf9TGLtOF2kWCf941WOHNvMZrcBwRENdXD+rJlpUdyfkX H4F9odacjpAorU8s0aa8IBOIDLX5Kia8iAVzWn7Ja7P+VLC+uNUuV+BTtG4pBDYZ RTgae1YWjMpqdq8BIj2DqMdrVX0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=default; bh=jXy5yRxE2iJ644O6B06lJR keChE=; b=rnQC4ZWMJYBnz5NemHR8Uw1eP0G0S3K6s6vvy3ZkYNIfFpzxbF+odN FBZpUE+i4XunukUkwnhxk/9NRBBnkveCf/FwGmKooIXwwjIuwNjtTp4WHgfWawMr vkYRg9EGM0HVi6Zz69gf/VZukiHG7ZuHLYcgdim7UEMaaNrcAe7g0= Received: (qmail 8891 invoked by alias); 9 Oct 2014 16:32:35 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 8787 invoked by uid 89); 9 Oct 2014 16:32:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00 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; Thu, 09 Oct 2014 16:32:32 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XcGdg-0001Vm-PN from Thomas_Schwinge@mentor.com for gcc-patches@gcc.gnu.org; Thu, 09 Oct 2014 09:32:29 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.181.6; Thu, 9 Oct 2014 17:32:27 +0100 From: Thomas Schwinge To: Cesar Philippidis CC: "gcc-patches@gcc.gnu.org" Subject: Re: [gomp4] reduction bug fix In-Reply-To: <54356CF2.1040900@codesourcery.com> References: <542ECD5C.3040201@codesourcery.com> <542DC750.3020601@mentor.com> <87h9ze3nqc.fsf@schwinge.name> <54356CF2.1040900@codesourcery.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Thu, 9 Oct 2014 18:32:24 +0200 Message-ID: <87h9zd19wn.fsf@schwinge.name> MIME-Version: 1.0 Hi Cesar! On Wed, 8 Oct 2014 09:57:22 -0700, Cesar Philippidis wrote: > On 10/08/2014 02:38 AM, Thomas Schwinge wrote: > > > On Fri, 3 Oct 2014 09:22:52 -0700, Cesar Philippidis wrote: > >> There is a reduction bug [...] > >> This patch also includes a runtime test case. I won't apply it to > >> gomp-4_0-branch just yet. But I wanted to demonstrate a test case > >> nonetheless. > > > > You can add it as a compile test, and I'll toggle to a run test as part > > of the merge into our internal development branch. > > OK. I've added a compile test to gcc.dg/goaccc/. Note that this test > depends on -std=c99, so I couldn't put it in the c-c++-common directory. Oh, sorry if that was unclear. I meant to have it already now added to libgomp/testsuite/, but as a compile-only test, and then I would toggle that to an execution test later on. I've changed that... > >> Is this OK for gomp-4_0-branch? > > > > Yes, with the following addressed: > > > >> --- a/gcc/omp-low.c > >> +++ b/gcc/omp-low.c > >> @@ -10140,11 +10140,20 @@ process_reduction_data (gimple_seq *body, gimple_seq *in_stmt_seqp, > > > > [...]/source-gcc/gcc/omp-low.c: In function 'void _ZL22process_reduction_dataPP21gimple_statement_baseS1_S1_P11omp_context.isra.167.constprop.180(gimple_statement_base**, gimple_statement_base**, gimple_statement_base**, gimple)': > > [...]/source-gcc/gcc/omp-low.c:10172:14: warning: 'inner' may be used uninitialized in this function [-Wmaybe-uninitialized] > > gimple_seq inner; > > ^ ..., and addressed this in r216040: commit d77ae8538ddf8a550f431f7849da735cba8f37bb Author: tschwinge Date: Thu Oct 9 16:30:40 2014 +0000 Follow-up on reduction bug fix. gcc/ * omp-low.c (process_reduction_data): Initialize variable inner. gcc/testsuite/ * gcc.dg/goacc/collapse.c: Move file to libgomp/testsuite/libgomp.oacc-c/collapse-4.c. libgomp/ * testsuite/libgomp.oacc-c/collapse-4.c: New file, moved from gcc/testsuite/gcc.dg/goacc/collapse.c. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@216040 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog.gomp | 4 ++++ gcc/omp-low.c | 2 +- gcc/testsuite/ChangeLog.gomp | 5 +++++ libgomp/ChangeLog.gomp | 5 +++++ .../collapse.c => libgomp/testsuite/libgomp.oacc-c/collapse-4.c | 1 + 5 files changed, 16 insertions(+), 1 deletion(-) Grüße, Thomas diff --git gcc/ChangeLog.gomp gcc/ChangeLog.gomp index 76f8d2b..ce0dcc7 100644 --- gcc/ChangeLog.gomp +++ gcc/ChangeLog.gomp @@ -1,3 +1,7 @@ +2014-10-09 Thomas Schwinge + + * omp-low.c (process_reduction_data): Initialize variable inner. + 2014-10-08 Cesar Philippidis * omp-low.c (lower_reduction_clauses): Clarify comment. diff --git gcc/omp-low.c gcc/omp-low.c index 42e84b0..b8022c2 100644 --- gcc/omp-low.c +++ gcc/omp-low.c @@ -10013,7 +10013,7 @@ process_reduction_data (gimple_seq *body, gimple_seq *in_stmt_seqp, gcc_assert (is_gimple_omp_oacc_specifically (ctx->stmt)); gimple_stmt_iterator gsi; - gimple_seq inner; + gimple_seq inner = NULL; gimple stmt; /* A collapse clause may have inserted a new bind block. */ diff --git gcc/testsuite/ChangeLog.gomp gcc/testsuite/ChangeLog.gomp index 01bc225..48651ad 100644 --- gcc/testsuite/ChangeLog.gomp +++ gcc/testsuite/ChangeLog.gomp @@ -1,3 +1,8 @@ +2014-10-09 Thomas Schwinge + + * gcc.dg/goacc/collapse.c: Move file to + libgomp/testsuite/libgomp.oacc-c/collapse-4.c. + 2014-10-08 Cesar Philippidis * gcc.dg/goacc/collapse.c: New test. diff --git libgomp/ChangeLog.gomp libgomp/ChangeLog.gomp index abc38a6..0acc4ca 100644 --- libgomp/ChangeLog.gomp +++ libgomp/ChangeLog.gomp @@ -1,3 +1,8 @@ +2014-10-09 Thomas Schwinge + + * testsuite/libgomp.oacc-c/collapse-4.c: New file, moved from + gcc/testsuite/gcc.dg/goacc/collapse.c. + 2014-09-23 Thomas Schwinge * libgomp.map (OACC_2.0): Add acc_on_device, acc_on_device_. diff --git gcc/testsuite/gcc.dg/goacc/collapse.c libgomp/testsuite/libgomp.oacc-c/collapse-4.c similarity index 83% rename from gcc/testsuite/gcc.dg/goacc/collapse.c rename to libgomp/testsuite/libgomp.oacc-c/collapse-4.c index 1ec20a4..7df0de2 100644 --- gcc/testsuite/gcc.dg/goacc/collapse.c +++ libgomp/testsuite/libgomp.oacc-c/collapse-4.c @@ -1,3 +1,4 @@ +/* TODO: change to a run test once libgomp supports all data clauses. */ /* { dg-do compile } */ /* { dg-options "-O2 -std=c99" } */