aboutsummaryrefslogtreecommitdiff
path: root/test/asan/TestCases/Windows/global_const_string.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/asan/TestCases/Windows/global_const_string.cc')
-rw-r--r--test/asan/TestCases/Windows/global_const_string.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/asan/TestCases/Windows/global_const_string.cc b/test/asan/TestCases/Windows/global_const_string.cc
new file mode 100644
index 000000000000..8c147c917c88
--- /dev/null
+++ b/test/asan/TestCases/Windows/global_const_string.cc
@@ -0,0 +1,12 @@
+// RUN: %clang_cl_asan -O0 %s -Fe%t
+// RUN: %run %t | FileCheck %s
+
+#include <windows.h>
+#include <stdio.h>
+
+int main(void) {
+ static const char *foo = "foobarspam";
+ printf("Global string is `%s`\n", foo);
+// CHECK: Global string is `foobarspam`
+ return 0;
+}