public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, committed] error in target-supports function for Cilk keywords test
@ 2014-01-15 17:46 Iyer, Balaji V
  0 siblings, 0 replies; only message in thread
From: Iyer, Balaji V @ 2014-01-15 17:46 UTC (permalink / raw)
  To: gcc-patches

Hello Everyone,
	I noticed that there was  an error in the testcode in "check_libcilkrts_available" target-supports function for C++. It was working fine in C but needed an extern "C" along with a prototype for C++. This patch below should fix that. This patch is committed as obvious (..more like "doh!").  If anyone has any issues, please let me know and I will fix them.

Thanks,

Balaji V. Iyer.

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" ]
 }



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-01-15 17:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-15 17:46 [PATCH, committed] error in target-supports function for Cilk keywords test Iyer, Balaji V

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).