summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/sso/dump.h9
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 9f327b38333..f10927f5acb 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2015-11-24 Nathan Sidwell <nathan@acm.org>
+
+ * gcc.dg/sso/dump.h: Force IO to be putchar function call on nvptx.
+
2015-11-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR rtl-optimization/68381
diff --git a/gcc/testsuite/gcc.dg/sso/dump.h b/gcc/testsuite/gcc.dg/sso/dump.h
index 0bcf59682f1..81ff87a0d17 100644
--- a/gcc/testsuite/gcc.dg/sso/dump.h
+++ b/gcc/testsuite/gcc.dg/sso/dump.h
@@ -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)