[PATCH v2] Destroy arguments for _Cilk_spawn calling in the child (PR 80038)

Xi Ruoyao ryxi@stu.xidian.edu.cn
Tue May 2 08:18:00 GMT 2017


On 2017-05-02 09:16 +0200, Andreas Schwab wrote:

> This could be related to --enable-checking=release:
> 
> In file included from ../../gcc/c-family/c-common.h:26:0,
>                  from ../../gcc/c-family/cilk.c:28:
> ../../gcc/c-family/cilk.c: In function 'bool cilk_set_spawn_marker(location_t, tree)':
> ../../gcc/tree.h:901:42: error: 'tree_check2' was not declared in this scope
>                  CALL_EXPR, AGGR_INIT_EXPR)->base.u.bits.unsigned_flag)
>                                           ^
> ../../gcc/c-family/cilk.c:113:9: note: in expansion of macro 'EXPR_CILK_SPAWN'
>          EXPR_CILK_SPAWN (fcall) = 1;
>          ^
> ../../gcc/tree.h:901:42: error: 'tree_check2' was not declared in this scope
>                  CALL_EXPR, AGGR_INIT_EXPR)->base.u.bits.unsigned_flag)
>                                           ^
> ../../gcc/c-family/cilk.c:115:9: note: in expansion of macro 'EXPR_CILK_SPAWN'
>          EXPR_CILK_SPAWN (TREE_OPERAND (fcall, 1)) = 1;
>          ^
> 
> Andreas.
> 

Sorry T_T.  I've made a stupid mistake in tree.h.

Let's apply following patch, and alert the RM when backporting r247446.

2017-05-02 Xi Ruoyao <ryxi@stu.xidian.edu.cn>

	* tree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of
	function tree_check2.
---
 gcc/tree.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/tree.h b/gcc/tree.h
index 3bca90a..fdaa7af 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -897,8 +897,8 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
 /* If this is true, we should insert a __cilk_detach call just before
    this function call.  */
 #define EXPR_CILK_SPAWN(NODE) \
-  (tree_check2 (NODE, __FILE__, __LINE__, __FUNCTION__, \
-                CALL_EXPR, AGGR_INIT_EXPR)->base.u.bits.unsigned_flag)
+  (TREE_CHECK2 (NODE, CALL_EXPR, \
+                AGGR_INIT_EXPR)->base.u.bits.unsigned_flag)
 
 /* In a RESULT_DECL, PARM_DECL and VAR_DECL, means that it is
    passed by invisible reference (and the TREE_TYPE is a pointer to the true
-- 
2.7.1

-- 
Xi Ruoyao <ryxi@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University



More information about the Gcc-patches mailing list