]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c/c-typeck.c
re PR c/60197 (ICE with _Cilk_spawn in expression)
authorMarek Polacek <polacek@redhat.com>
Thu, 6 Mar 2014 13:41:46 +0000 (13:41 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 6 Mar 2014 13:41:46 +0000 (13:41 +0000)
commit3af9c5e9783dd757a944a9022bec182ced5e0596
tree2d668c3e9bd8ebb785bab61a9adb5b1d97776036
parent227a7dc8fb3b72780e5127d85306381b8ff3e81e
re PR c/60197 (ICE with _Cilk_spawn in expression)

PR c/60197
c-family/
* cilk.c (contains_cilk_spawn_stmt): New function.
(contains_cilk_spawn_stmt_walker): Likewise.
(recognize_spawn): Give error on invalid use of _Cilk_spawn.
* c-common.h (contains_cilk_spawn_stmt): Add declaration.
c/
* c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
of checking tree code.
cp/
* typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
of checking tree code.
testsuite/
* c-c++-common/cilk-plus/CK/pr60197.c: New test.
* c-c++-common/cilk-plus/CK/pr60197-2.c: New test.

From-SVN: r208382
gcc/c-family/ChangeLog
gcc/c-family/c-common.h
gcc/c-family/cilk.c
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197-2.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197.c [new file with mode: 0644]