This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix thinko in expand_builtin_cilk_detach
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 23 Nov 2013 17:43:04 +0100
- Subject: Fix thinko in expand_builtin_cilk_detach
- Authentication-results: sourceware.org; auth=none
The 'worker' field has pointer type
tree worker_type = lang_hooks.types.make_type (RECORD_TYPE);
tree worker_ptr = build_pointer_type (worker_type);
[...]
tree worker = add_field ("worker", worker_ptr, parent);
so it needs to be dereferenced before being subject to COMPONENT_REF.
Tested on x86_64-suse-linux, applied on the mainline as obvious.
2013-11-23 Eric Botcazou <ebotcazou@adacore.com>
* cilk-common.c (expand_builtin_cilk_detach): Dereference worker.
--
Eric Botcazou
Index: cilk-common.c
===================================================================
--- cilk-common.c (revision 205300)
+++ cilk-common.c (working copy)
@@ -328,7 +328,7 @@ expand_builtin_cilk_detach (tree exp)
tree parent = cilk_dot (fptr, CILK_TI_FRAME_PARENT, 0);
tree worker = cilk_dot (fptr, CILK_TI_FRAME_WORKER, 0);
- tree tail = cilk_dot (worker, CILK_TI_WORKER_TAIL, 1);
+ tree tail = cilk_arrow (worker, CILK_TI_WORKER_TAIL, 1);
rtx wreg = expand_expr (worker, NULL_RTX, Pmode, EXPAND_NORMAL);
if (GET_CODE (wreg) != REG)