2 /* { dg-do compile } */
3 /* { dg-options "-fcilkplus" } */
11 return (_Cilk_spawn
foo ()) * 2; /* { dg-error "in a return statement is not allowed" } */
17 return (_Cilk_spawn
foo ()) > 2; /* { dg-error "in a return statement is not allowed" } */
21 fn3 (int i
, int j
, int k
)
23 return ((((((_Cilk_spawn
foo () + i
) - j
) * k
) / j
) | i
) ^ k
) ; /* { dg-error "in a return statement is not allowed" } */
27 fn4 (int i
, int j
, int k
)
29 return (((((i
- _Cilk_spawn
foo ()) * k
) / j
) | i
) ^ k
); /* { dg-error "in a return statement is not allowed" } */
35 return _Cilk_spawn
foo (); /* { dg-error "in a return statement is not allowed" } */
41 return _Cilk_spawn
foo () + _Cilk_spawn
foo (); /* { dg-error "in a return statement is not allowed" } */
47 return 5 % _Cilk_spawn
foo (); /* { dg-error "in a return statement is not allowed" } */
53 return !_Cilk_spawn
foo (); /* { dg-error "in a return statement is not allowed" } */
59 return foo () && _Cilk_spawn
foo (); /* { dg-error "in a return statement is not allowed" } */
65 return bar (_Cilk_spawn
foo ()); /* { dg-error "in a return statement is not allowed" } */