re PR c++/69024 ([cilkpus] cilk_spawn is broken for initializations with implicit...
authorRyan Burn <contact@rnburn.com>
Wed, 27 Apr 2016 20:41:52 +0000 (20:41 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 27 Apr 2016 20:41:52 +0000 (14:41 -0600)
commit6bc2bb1821cc65ff6e463cb1fc930c5d152fe04d
tree01aff7302afade8fb5843d89091bb1813cde6002
parent85a7c9263c2554811e9fc0e1ce7bec3b3bf6b7f5
re PR c++/69024 ([cilkpus] cilk_spawn is broken for initializations with implicit conversion operators defined)

PR c++/69024
PR c++/68997
* cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
(cilk_recognize_spawn): Renamed from recognize_spawn and change to
external linkage.
(cilk_detect_and_unwrap): Corresponding changes.
(extract_free_variables): Don't extract free variables from
AGGR_INIT_EXPR slot.
* c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
(cilk_recognize_spawn): Likewise.

PR c++/69024
PR c++/68997
* cp-gimplify.c (cp_gimplify_expr): Call cilk_cp_detect_spawn_and_unwrap
instead of cilk_detect_spawn_and_unwrap.
* cp-cilkplus.c (is_conversion_operator_function_decl_p): New.
(find_spawn): New.
(cilk_cp_detect_spawn_and_unwrap): New.
* lambda.c: Include cp-cilkplus.h.
* parser.c: Include cp-cilkplus.h.
* cp-tree.h (cpp_validate_cilk_plus_loop): Move prototype into...
* cp-cilkpus.h: New file.

PR c++/69024
PR c++/68997
* g++.dg/cilk-plus/CK/pr68001.cc: Fix to not depend on broken
diagnostic.
* g++.dg/cilk-plus/CK/pr69024.cc: New test.
* g++.dg/cilk-plus/CK/pr68997.cc: New test.

Co-Authored-By: Jeff Law <law@redhat.com>
From-SVN: r235534
14 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c-common.h
gcc/c-family/cilk.c
gcc/cp/ChangeLog
gcc/cp/cp-cilkplus.c
gcc/cp/cp-cilkplus.h [new file with mode: 0644]
gcc/cp/cp-gimplify.c
gcc/cp/cp-tree.h
gcc/cp/lambda.c
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cilk-plus/CK/pr68001.cc
gcc/testsuite/g++.dg/cilk-plus/CK/pr68997.cc [new file with mode: 0644]
gcc/testsuite/g++.dg/cilk-plus/CK/pr69024.cc [new file with mode: 0644]