aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_spawns.c
blob: 5b43be76010b3674a54c29c18ace7f21e29d4d9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-options "-fcilkplus" } */

extern int foo ();
int bar = _Cilk_spawn foo (); /* { dg-error "may only be used inside a function" } */


int main (void)
{
  int x; 

  _Cilk_spawn foo; /* { dg-error "only function calls can be spawned" } */
  _Cilk_spawn x; /* { dg-error "only function calls can be spawned" } */
  return x;
}