Fix spawned function with lambda function
authorBalaji V. Iyer <balaji.v.iyer@intel.com>
Wed, 2 Sep 2015 23:59:21 +0000 (23:59 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Wed, 2 Sep 2015 23:59:21 +0000 (16:59 -0700)
commit3894284078b0eae1b32952b3347d611762066d6a
tree8307f0b414b207edca570b97f7da74a6050db019
parentd04ff41777d999fe5f387f46ec8b9cb22422c513
Fix spawned function with lambda function

Make sure that the spawned function's arguments will not be pushed
into lambda function.

gcc/c-family/

2015-09-02  Balaji V. Iyer  <balaji.v.iyer@intel.com>

PR middle-end/60586
* c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
prototype.
* c-gimplify.c (c_gimplify_expr): Added a call to the function
cilk_gimplify_call_params_in_spawned_fn.
* cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
(gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
unwrapping.

gcc/cp/

2015-09-02  Balaji V. Iyer  <balaji.v.iyer@intel.com>

PR middle-end/60586
* cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): New
function.
(cp_gimplify_expr): Added a call to the function
cilk_cp_gimplify_call_params_in_spawned_fn.

gcc/testsuite/

2015-09-02  Balaji V. Iyer  <balaji.v.iyer@intel.com>

PR middle-end/60586
* c-c++-common/cilk-plus/CK/pr60586.c: New file.
* g++.dg/cilk-plus/CK/pr60586.cc: Likewise.

From-SVN: r227423
gcc/c-family/ChangeLog
gcc/c-family/c-common.h
gcc/c-family/c-gimplify.c
gcc/c-family/cilk.c
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/cilk-plus/CK/pr60586.c [new file with mode: 0644]
gcc/testsuite/g++.dg/cilk-plus/CK/pr60586.cc [new file with mode: 0644]