diff options
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-family/cilk.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index e3b9654..af21551 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2015-01-14 Ryan Burn <contact@rnburn.com> + + PR c++/69048 + * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr + to add missing cleanup point. + 2016-01-14 David Malcolm <dmalcolm@redhat.com> PR c++/68819 diff --git a/gcc/c-family/cilk.c b/gcc/c-family/cilk.c index 57dfa41..4d6be33 100644 --- a/gcc/c-family/cilk.c +++ b/gcc/c-family/cilk.c @@ -592,6 +592,11 @@ create_cilk_wrapper_body (tree stmt, struct wrapper_data *wd) for (p = wd->parms; p; p = TREE_CHAIN (p)) DECL_CONTEXT (p) = fndecl; + /* The statement containing the spawn expression might create temporaries with + destructors defined; if so we need to add a CLEANUP_POINT_EXPR to ensure + the expression is properly gimplified. */ + stmt = fold_build_cleanup_point_expr (void_type_node, stmt); + gcc_assert (!DECL_SAVED_TREE (fndecl)); cilk_install_body_with_frame_cleanup (fndecl, stmt, (void *) wd); gcc_assert (DECL_SAVED_TREE (fndecl)); |