diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cilk-plus/CK/catch_exc.cc')
-rw-r--r-- | gcc/testsuite/g++.dg/cilk-plus/CK/catch_exc.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cilk-plus/CK/catch_exc.cc b/gcc/testsuite/g++.dg/cilk-plus/CK/catch_exc.cc index 0633d19030c..09ddf8b28e3 100644 --- a/gcc/testsuite/g++.dg/cilk-plus/CK/catch_exc.cc +++ b/gcc/testsuite/g++.dg/cilk-plus/CK/catch_exc.cc @@ -10,6 +10,16 @@ #endif #include <cstdlib> +#ifdef __cplusplus +extern "C" { +#endif + +extern int __cilkrts_set_param (const char *, const char *); + +#ifdef __cplusplus +} +#endif + void func(int volatile* steal_me) { @@ -59,6 +69,10 @@ void my_test() int main() { + /* Ensure more than one worker. */ + if (__cilkrts_set_param("nworkers", "2") != 0) + __builtin_abort(); + my_test(); #if HAVE_IO printf("PASSED\n"); |