This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PR68001, CilkPlus] Fix for PR68001
- From: "Zamyatin, Igor" <igor dot zamyatin at intel dot com>
- To: 'Andreas Schwab' <schwab at suse dot de>
- Cc: "GCC Patches (gcc-patches at gcc dot gnu dot org)" <gcc-patches at gcc dot gnu dot org>, "Jeff Law (law at redhat dot com)" <law at redhat dot com>, "Jakub Jelinek (jakub at redhat dot com)" <jakub at redhat dot com>
- Date: Mon, 30 Nov 2015 20:43:10 +0000
- Subject: RE: [PR68001, CilkPlus] Fix for PR68001
- Authentication-results: sourceware.org; auth=none
- References: <0EFAB2BDD0F67E4FB6CCC8B9F87D756973814270 at IRSMSX101 dot ger dot corp dot intel dot com> <mvmmvu3ms3g dot fsf at hawking dot suse dot de>
>
> 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.
Bootstrapped and regtested on x86_64, ok for trunk?
Thanks,
Igor
cp/Changelog
2015-11-27 Igor Zamyatin <igor.zamyatin@intel.com>
PR c++/68001
* cp-gimplify.c (cp_gimplify_expr): Limit GS_ERROR only in case of
error in cilk spawn detection.
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);