On 11/24/15 00:01, Jeff Law wrote:
On 11/23/2015 01:54 PM, Nathan Sidwell wrote:
On 11/23/15 15:41, Jeff Law wrote:


In the 'put' function, why not just make all targets go through
putchar?  It's not like this is performance critical code and I
don't think it compromises any of the tests, does it?

I contemplated that, but wondered if someone would complain.  I'm
happy either way.
Let's go with a single codepath here.  The one that ought to work for all
targets is putchar.

Done.

nathan

2015-11-24  Nathan Sidwell  <nat...@acm.org>

	* gcc.dg/sso/dump.h: Force IO to be putchar function call on nvptx.

Index: gcc/testsuite/gcc.dg/sso/dump.h
===================================================================
--- gcc/testsuite/gcc.dg/sso/dump.h	(revision 230809)
+++ gcc/testsuite/gcc.dg/sso/dump.h	(working copy)
@@ -1,3 +1,8 @@
+#ifdef __nvptx__
+/* Force function call.  NVPTX's IO is extremely limited.  */
+#undef putchar
+#endif
+
 void dump (void *p, unsigned int len)
 {
   const char digits[17] = "0123456789abcdef";
@@ -14,7 +19,9 @@ void dump (void *p, unsigned int len)
 
 void put (const char s[])
 {
-  fputs (s, stdout);
+  int i;
+  for (i = 0; s[i]; i++)
+    putchar (s[i]);
 }
 
 void new_line (void)

Reply via email to