public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: "Zamyatin, Igor" <igor.zamyatin@intel.com>,
	       "GCC Patches (gcc-patches@gcc.gnu.org)"
	<gcc-patches@gcc.gnu.org>
Cc: "Jakub Jelinek (jakub@redhat.com)" <jakub@redhat.com>
Subject: Re: [PR68001, CilkPlus] Fix for PR68001
Date: Mon, 02 Nov 2015 22:11:00 -0000	[thread overview]
Message-ID: <5637DF94.2060005@redhat.com> (raw)
In-Reply-To: <0EFAB2BDD0F67E4FB6CCC8B9F87D756973814270@IRSMSX101.ger.corp.intel.com>

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  <igor.zamyatin@intel.com>
> 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  <igor.zamyatin@intel.com>
>
> 	PR c++/68001
> 	* cp-gimplify.c (cp_gimplify_expr): Stop the process if see an error.
>
> testsuite
>
> 2015-11-02  Igor Zamyatin  <igor.zamyatin@intel.com>
>
> 	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

  reply	other threads:[~2015-11-02 22:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-02 20:08 Zamyatin, Igor
2015-11-02 22:11 ` Jeff Law [this message]
2015-11-24 13:53 ` Andreas Schwab
2015-11-30 20:49   ` Zamyatin, Igor
2015-12-02  7:50     ` Tom de Vries
2015-12-05 10:09     ` Zamyatin, Igor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5637DF94.2060005@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=igor.zamyatin@intel.com \
    --cc=jakub@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).