aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_spawns.c
blob: ba9e6193627ebe7438f612130430438e1b83f210 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { 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 x; /* { dg-error "only function calls can be spawned" } */
  return x;
}