1 /* { dg-options "-fcilkplus" } */
2 /* { dg-do run { target i?86-*-* x86_64-*-* arm*-*-* } } */
3 /* { dg-options "-fcilkplus -lcilkrts" { target { i?86-*-* x86_64-*-* arm*-*-* } } } */
9 #include <cilk/cilk_api.h>
14 void func(int volatile* steal_me
)
21 printf("Foo executing on %d\n", __cilkrts_get_worker_number());
28 volatile int steal_me
= 0;
32 _Cilk_spawn
func(&steal_me
);
34 printf("Continuation executing on %d\n",
35 __cilkrts_get_worker_number());
45 printf("We caught x = %d\n", x
);
53 printf("We should not be here!\n");