From c2d7410417b6984bcfc120d8f27280abd3ea02dc Mon Sep 17 00:00:00 2001 From: "Balaji V. Iyer" Date: Wed, 15 Jan 2014 19:11:16 +0000 Subject: target-supports.exp (check_libcilkrts_available): Added an extern "C" if we are using C++ along with a function prototype. 2014-01-15 Balaji V. Iyer * lib/target-supports.exp (check_libcilkrts_available): Added an extern "C" if we are using C++ along with a function prototype. From-SVN: r206640 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/lib/target-supports.exp | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dcfb671..b85e51e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-01-15 Balaji V. Iyer + + * lib/target-supports.exp (check_libcilkrts_available): Added an + extern "C" if we are using C++ along with a function prototype. + 2014-01-15 Jeff Law PR tree-optimization/59747 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 159f88f..ebb28ae 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1038,9 +1038,13 @@ proc check_iconv_available { test_what } { # Return true if Cilk Library is supported on the target. proc check_libcilkrts_available { } { return [ check_no_compiler_messages_nocache libcilkrts_available executable { + #ifdef __cplusplus + extern "C" + #endif + int __cilkrts_set_param (const char *, const char *); int main (void) { - __cilkrts_set_param ("nworkers", "0"); - return 0; + int x = __cilkrts_set_param ("nworkers", "0"); + return x; } } "-fcilkplus -lcilkrts" ] } -- cgit v1.1