summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/lib
diff options
context:
space:
mode:
authorbviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-15 19:11:16 +0000
committerbviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-15 19:11:16 +0000
commitf0b627ffedd760cca38bc35f2a6e80abeb1d60ad (patch)
tree3ba41fab60607ae4a66dfadf924f2add045f2a0a /gcc/testsuite/lib
parent7e173c71632a60fafc26b27fe383e63ae3000e22 (diff)
downloadppe42-gcc-f0b627ffedd760cca38bc35f2a6e80abeb1d60ad.tar.gz
ppe42-gcc-f0b627ffedd760cca38bc35f2a6e80abeb1d60ad.zip
2014-01-15 Balaji V. Iyer <balaji.v.iyer@intel.com>
* lib/target-supports.exp (check_libcilkrts_available): Added an extern "C" if we are using C++ along with a function prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206640 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/lib')
-rw-r--r--gcc/testsuite/lib/target-supports.exp8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 159f88f28dd..ebb28aeb39f 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" ]
}
OpenPOWER on IntegriCloud