diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/concec_cilk_spawn.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/concec_cilk_spawn.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/concec_cilk_spawn.c b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/concec_cilk_spawn.c new file mode 100644 index 000000000..b93c9626d --- /dev/null +++ b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/concec_cilk_spawn.c @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-fcilkplus" } */ + +/* <feature> Consecutive _Cilk_spawn tokens are not permitted + </feature> +*/ + +int spawn_func (int arg) +{ + return arg + 1; +} + +void func () +{ + int a; + a = _Cilk_spawn _Cilk_spawn spawn_func (4); /* { dg-error "consecutive" } */ + a = _Cilk_spawn _Cilk_spawn _Cilk_spawn spawn_func (4); /* { dg-error "consecutive" } */ + a = _Cilk_spawn _Cilk_spawn _Cilk_spawn _Cilk_spawn spawn_func (4); /* { dg-error "consecutive" } */ + return; +} |