diff options
author | Xi Ruoyao <ryxi@stu.xidian.edu.cn> | 2017-05-01 22:26:02 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2017-05-01 16:26:02 -0600 |
commit | 815d9cc6641a3eeb6734a98f64ea8b183a495ee5 (patch) | |
tree | a8a033d722da210460642c7a397ad087d9c87d1f /gcc/c | |
parent | 338035aa194405df94875cebb389d593cf9ef00a (diff) | |
download | gcc-815d9cc6641a3eeb6734a98f64ea8b183a495ee5.zip gcc-815d9cc6641a3eeb6734a98f64ea8b183a495ee5.tar.gz gcc-815d9cc6641a3eeb6734a98f64ea8b183a495ee5.tar.bz2 |
re PR c++/80038 (Random segfault using local vectors in Cilk function)
2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
PR c++/80038
* cilk_common.c (expand_builtin_cilk_detach): Move pedigree
operations here.
* gimplify.c (gimplify_cilk_detach): New function.
(gimplify_call_expr, gimplify_modify_expr): Call it as needed.
* tree-core.h: Document EXPR_CILK_SPAWN.
* tree.h (EXPR_CILK_SPAWN): Define.
PR c++/80038
* c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
prototype.
(cilk_install_body_pedigree_operations): Likewise.
* cilk.c (cilk_set_spawn_marker): Mark functions that should be
detatched.
(cilk_gimplify_call_params_in_spawned_fn): Remove.
(cilk_install_body_pedigree_operations): Likewise.
(gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
unwrapping.
PR c++/80038
* c-gimplify.c (c_gimplify_expr): Remove calls to
cilk_gimplifY_call_params_in_spawned_fn.
PR c++/80038
* cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Don't
add pedigree operation and detach call here.
* cp-gimplify.c (cp_gimplify_expr): Remove the calls to
cilk_cp_gimplify_call_params_in_spawned_fn.
(cilk_cp_gimplify_call_params_in_spawned_fn): Remove function.
* semantics.c (simplify_aggr_init_expr): Copy EXPR_CILK_SPAWN.
PR c++/80038
* lto-lang.c (lto_init): Set in_lto_p earlier.
PR c++/80038
* g++.dg/cilk-plus/CK/pr80038.cc: New test.
From-SVN: r247446
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c/c-typeck.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 5587e2f..3c26eac 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,9 @@ +2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn> + + PR c++/80038 + * c-gimplify.c (c_gimplify_expr): Remove calls to + cilk_gimplifY_call_params_in_spawned_fn. + 2017-04-25 David Malcolm <dmalcolm@redhat.com> * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c index ff239e2..6f9909c 100644 --- a/gcc/c/c-typeck.c +++ b/gcc/c/c-typeck.c @@ -14215,14 +14215,8 @@ cilk_install_body_with_frame_cleanup (tree fndecl, tree body, void *w) add_local_decl (cfun, frame); DECL_SAVED_TREE (fndecl) = list; - tree frame_ptr = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (frame)), - frame); - tree body_list = cilk_install_body_pedigree_operations (frame_ptr); - gcc_assert (TREE_CODE (body_list) == STATEMENT_LIST); - - tree detach_expr = build_call_expr (cilk_detach_fndecl, 1, frame_ptr); - append_to_statement_list (detach_expr, &body_list); + tree body_list = alloc_stmt_list (); cilk_outline (fndecl, &body, (struct wrapper_data *) w); body = fold_build_cleanup_point_expr (void_type_node, body); |