summaryrefslogtreecommitdiff
path: root/test/sanitizer_common/TestCases/Posix/putc_putchar_unlocked.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/sanitizer_common/TestCases/Posix/putc_putchar_unlocked.cc')
-rw-r--r--test/sanitizer_common/TestCases/Posix/putc_putchar_unlocked.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/sanitizer_common/TestCases/Posix/putc_putchar_unlocked.cc b/test/sanitizer_common/TestCases/Posix/putc_putchar_unlocked.cc
new file mode 100644
index 000000000..12c35c220
--- /dev/null
+++ b/test/sanitizer_common/TestCases/Posix/putc_putchar_unlocked.cc
@@ -0,0 +1,12 @@
+// RUN: %clangxx -g %s -o %t && %run %t | FileCheck %s
+// CHECK: bc
+
+#include <assert.h>
+#include <stdio.h>
+
+int main(void) {
+ assert(putc_unlocked('b', stdout) != EOF);
+ assert(putchar_unlocked('c') != EOF);
+
+ return 0;
+}