2016-01-12 Jakub Jelinek <jakub@redhat.com>
+ PR objc++/68511
+ PR c++/69213
+ * cp-gimplify.c (cp_gimplify_expr) <case INIT_EXPR>: Don't return
+ GS_ERROR whenever seen_error (), only if *expr_p contains
+ cilk spawn stmt, but cilk_detect_spawn_and_unwrap failed.
+
PR c++/66808
PR c++/69000
* pt.c (tsubst_decl): If not local_p, clear DECL_TEMPLATE_INFO.
LHS of an assignment might also be involved in the RHS, as in bug
25979. */
case INIT_EXPR:
- if (fn_contains_cilk_spawn_p (cfun)
- && cilk_detect_spawn_and_unwrap (expr_p))
+ if (fn_contains_cilk_spawn_p (cfun))
{
- cilk_cp_gimplify_call_params_in_spawned_fn (expr_p, pre_p, post_p);
- return (enum gimplify_status) gimplify_cilk_spawn (expr_p);
+ if (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 () && contains_cilk_spawn_stmt (*expr_p))
+ return GS_ERROR;
}
- if (seen_error ())
- return GS_ERROR;
cp_gimplify_init_expr (expr_p);
if (TREE_CODE (*expr_p) != INIT_EXPR)