aboutsummaryrefslogtreecommitdiff
path: root/compiler-rt/test/asan/TestCases/wcsncpy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/test/asan/TestCases/wcsncpy.cpp')
-rw-r--r--compiler-rt/test/asan/TestCases/wcsncpy.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler-rt/test/asan/TestCases/wcsncpy.cpp b/compiler-rt/test/asan/TestCases/wcsncpy.cpp
index 485ddc4..9e11b55 100644
--- a/compiler-rt/test/asan/TestCases/wcsncpy.cpp
+++ b/compiler-rt/test/asan/TestCases/wcsncpy.cpp
@@ -8,10 +8,12 @@
int main() {
const wchar_t *src = L"X means dog";
- wchar_t goodDst[12];
+ wchar_t goodArray[12];
+ wchar_t *volatile goodDst = goodArray;
wcsncpy(goodDst, src, 12);
- wchar_t badDst[7];
+ wchar_t badArray[7];
+ wchar_t *volatile badDst = badArray;
wcsncpy(badDst, src, 7); // This should still work.
fprintf(stderr, "Good so far.\n");
// CHECK-DAG: Good so far.