From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65972 invoked by alias); 2 Nov 2015 22:11:36 -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 65958 invoked by uid 89); 2 Nov 2015 22:11:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 02 Nov 2015 22:11:34 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 2C7E4C0AEE53; Mon, 2 Nov 2015 22:11:33 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-134.phx2.redhat.com [10.3.113.134]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA2MBWmA024629; Mon, 2 Nov 2015 17:11:32 -0500 Subject: Re: [PR68001, CilkPlus] Fix for PR68001 To: "Zamyatin, Igor" , "GCC Patches (gcc-patches@gcc.gnu.org)" References: <0EFAB2BDD0F67E4FB6CCC8B9F87D756973814270@IRSMSX101.ger.corp.intel.com> Cc: "Jakub Jelinek (jakub@redhat.com)" From: Jeff Law Message-ID: <5637DF94.2060005@redhat.com> Date: Mon, 02 Nov 2015 22:11:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <0EFAB2BDD0F67E4FB6CCC8B9F87D756973814270@IRSMSX101.ger.corp.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00133.txt.bz2 On 11/02/2015 01:08 PM, Zamyatin, Igor wrote: > Hi! > > This patch attempts to enhance error diagnostic in case of CilkPlus and fixes PR68001. > > Bootstrapped and regtested for x86_64. > Is it ok for trunk? > > Thanks, > Igor > > ChangeLog: > > c-family > > 2015-11-02 Igor Zamyatin > k > PR c++/68001 > * c-gimplify.c (c_gimplify_expr): Stop the process if see an error. > * cilk.c (recognize_spawn): Determine location in a more precise > way. > > cp > > 2015-11-02 Igor Zamyatin > > PR c++/68001 > * cp-gimplify.c (cp_gimplify_expr): Stop the process if see an error. > > testsuite > > 2015-11-02 Igor Zamyatin > > PR c++/68001 > * g++.dg/cilk-plus/CK/pr68001.cc: New test. > > > diff --git a/gcc/c-family/c-gimplify.c b/gcc/c-family/c-gimplify.c > index 92987b5..5b173d5 100644 > --- a/gcc/c-family/c-gimplify.c > +++ b/gcc/c-family/c-gimplify.c > @@ -283,15 +283,16 @@ c_gimplify_expr (tree *expr_p, gimple_seq *pre_p ATTRIBUTE_UNUSED, > > case CILK_SPAWN_STMT: > gcc_assert > - (fn_contains_cilk_spawn_p (cfun) > - && cilk_detect_spawn_and_unwrap (expr_p)); > + (fn_contains_cilk_spawn_p (cfun) > + && cilk_detect_spawn_and_unwrap (expr_p)); If you're trying to fix the formatting here, I think it ought to look like: gcc_assert (fn_contains_cilk_spawn_p (cfun) && cilk_detect_spawn_and_unwrap (expr_p)); ie, go ahead and start the expression on the same line as the gcc_assert, line break before the &&, and indent the && just inside the open-paren. > > +static tree > +contains_cilk_spawn_stmt_walker (tree *tp, int *, void *); > static void extract_free_variables (tree, struct wrapper_data *, > enum add_variable_type); Please format in the same way the call to extract_free_variables is formatted. >> @@ -733,16 +736,17 @@ cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p) > break; > > case CILK_SPAWN_STMT: > - gcc_assert > - (fn_contains_cilk_spawn_p (cfun) > - && cilk_detect_spawn_and_unwrap (expr_p)); > + gcc_assert > + (fn_contains_cilk_spawn_p (cfun) > + && cilk_detect_spawn_and_unwrap (expr_p)); Same formatting nit as c-gimplify.c With the formatting nits fixed, this is fine. jeff