]> git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/asan/TestCases/Windows/dll_large_function.cc
Imported Upstream version 1.6.0+dfsg1
[rustc.git] / src / compiler-rt / test / asan / TestCases / Windows / dll_large_function.cc
1 // Make sure we can link a DLL with large functions which would mean
2 // functions such as __asan_loadN and __asan_storeN will be called
3 // from the DLL. We simulate the large function with
4 // -mllvm -asan-instrumentation-with-call-threshold=0.
5 // RUN: %clang_cl_asan %s -c -Fo%t.obj -mllvm -asan-instrumentation-with-call-threshold=0
6 // RUN: link /nologo /DLL /OUT:%t.dll %t.obj %asan_dll_thunk
7 // REQUIRES: asan-static-runtime
8
9 void f(long* foo, long* bar) {
10 // One load and one store
11 *foo = *bar;
12 }