diff mbox

[PR68001,CilkPlus] Fix for PR68001

Message ID 0EFAB2BDD0F67E4FB6CCC8B9F87D7569738CB5BF@IRSMSX101.ger.corp.intel.com
State New
Headers show

Commit Message

Zamyatin, Igor Dec. 5, 2015, 10:09 a.m. UTC
> 
> >
> > FAIL: obj-c++.dg/property/dotsyntax-11.mm -fgnu-runtime  (test for
> > errors, line 51)
> > FAIL: obj-c++.dg/property/dotsyntax-11.mm -fgnu-runtime  (test for
> > errors, line 56)
> > FAIL: obj-c++.dg/property/dotsyntax-11.mm -fgnu-runtime  (test for
> > errors, line 59)
> >
> > Andreas.
> 
> Here is the patch that properly limits GS_ERROR exit only in case of error in
> cilk spawn detection.
>

Resending with PR68511 mentioned in Changelog 

Bootstrapped and regtested on x86_64, ok for trunk?

Thanks,
Igor


 cp/Changelog

2015-12-04  Igor Zamyatin  <igor.zamyatin@intel.com>

	PR objc++/68511
	PR c++/68001
	* cp-gimplify.c (cp_gimplify_expr): Limit GS_ERROR only in case of
	error in cilk spawn detection.
diff mbox

Patch

diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index 09ee5ff..3dbbd7f 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -559,6 +559,7 @@  int
 cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
 {
   int saved_stmts_are_full_exprs_p = 0;
+  bool is_spawn_detected = true;
   enum tree_code code = TREE_CODE (*expr_p);
   enum gimplify_status ret;
 
@@ -614,12 +615,12 @@  cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
 	 25979.  */
     case INIT_EXPR:
       if (fn_contains_cilk_spawn_p (cfun)
-	  && cilk_detect_spawn_and_unwrap (expr_p))
+	  && (is_spawn_detected = cilk_detect_spawn_and_unwrap (expr_p)))
 	{
 	  cilk_cp_gimplify_call_params_in_spawned_fn (expr_p, pre_p, post_p);
 	  return (enum gimplify_status) gimplify_cilk_spawn (expr_p);
 	}
-      if (seen_error ())
+      if (!is_spawn_detected && seen_error ())
 	return GS_ERROR;
 
       cp_gimplify_init_expr (expr_p);