diff mbox

Fix thinko in expand_builtin_cilk_detach

Message ID 46178825.eAcVZY5l9r@polaris
State New
Headers show

Commit Message

Eric Botcazou Nov. 23, 2013, 4:43 p.m. UTC
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.
diff mbox

Patch

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)