summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-24 13:53:31 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-24 13:53:31 +0000
commitfd9be551b990a618b682c0c93788d4c024f82afe (patch)
treee34fa388b150b59685b5f1ed1a732243d3c6e790
parentf8f3e2fae8f92153d113e252bc647e4e29aabfbc (diff)
downloadgcc-fd9be551b990a618b682c0c93788d4c024f82afe.tar.gz
* gcc.dg/sso/dump.h: Force IO to be putchar function call on nvptx.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230810 138bc75d-0d04-0410-961f-82ee72b054a4
-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)