diff options
Diffstat (limited to 'compiler-rt/test/asan/TestCases/Windows/global_const_string.cpp')
-rw-r--r-- | compiler-rt/test/asan/TestCases/Windows/global_const_string.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler-rt/test/asan/TestCases/Windows/global_const_string.cpp b/compiler-rt/test/asan/TestCases/Windows/global_const_string.cpp new file mode 100644 index 00000000000..546419dad18 --- /dev/null +++ b/compiler-rt/test/asan/TestCases/Windows/global_const_string.cpp @@ -0,0 +1,12 @@ +// RUN: %clang_cl_asan -Od %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; +} |