view gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_spawns.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

/* { 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;
}