aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorIgor Zamyatin <igor.zamyatin@intel.com>2015-11-23 12:58:12 +0000
committerKirill Yukhin <kyukhin@gcc.gnu.org>2015-11-23 12:58:12 +0000
commitcc5c5226961128c8c1c0eadd3d7997a59bf2a8b0 (patch)
tree30e258cf929d46b9df9c2b27f3695b35c4253e1c /gcc/cp
parentf7b492ea50624b72ec1d3c109fe0128a69b9e343 (diff)
downloadgcc-cc5c5226961128c8c1c0eadd3d7997a59bf2a8b0.zip
gcc-cc5c5226961128c8c1c0eadd3d7997a59bf2a8b0.tar.gz
gcc-cc5c5226961128c8c1c0eadd3d7997a59bf2a8b0.tar.bz2
re PR c++/68001 ([cilkplus] ICE in cp_gimplify_expr, at cp/cp-gimplify.c:760)
PR c++/68001 gcc/c-family 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. gcc/cp * cp-gimplify.c (cp_gimplify_expr): Stop the process if see an error. gcc/testsuite * g++.dg/cilk-plus/CK/pr68001.cc: New test. From-SVN: r230755
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/cp-gimplify.c14
2 files changed, 13 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 4f508bd..f401b82 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ PR c++/68001
+ * cp-gimplify.c (cp_gimplify_expr): Stop the process if see an error.
+
2015-11-20 Jakub Jelinek <jakub@redhat.com>
PR c++/67354
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index 99d0cfb..8fdcb6d 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -611,12 +611,14 @@ 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)
- && !seen_error ())
+ && 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 ())
+ return GS_ERROR;
+
cp_gimplify_init_expr (expr_p);
if (TREE_CODE (*expr_p) != INIT_EXPR)
return GS_OK;
@@ -725,16 +727,16 @@ 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));
- /* If errors are seen, then just process it as a CALL_EXPR. */
if (!seen_error ())
{
cilk_cp_gimplify_call_params_in_spawned_fn (expr_p, pre_p, post_p);
return (enum gimplify_status) gimplify_cilk_spawn (expr_p);
}
+ return GS_ERROR;
+
case CALL_EXPR:
if (fn_contains_cilk_spawn_p (cfun)
&& cilk_detect_spawn_and_unwrap (expr_p)