Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / msan / Linux / bzero.cpp
blobcb319a6cfa1e347cd663f911edfbc98ed558bb45
1 // RUN: %clangxx_msan -O0 %s -o %t && %run %t
3 // REQUIRES: !android
5 #include <assert.h>
6 #include <strings.h>
7 #include <sanitizer/msan_interface.h>
9 int main(int argc, char *argv[]) {
10 char buf[100];
11 assert(0 == __msan_test_shadow(buf, sizeof(buf)));
12 // *& to suppress bzero-to-memset optimization.
13 (*&bzero)(buf, 50);
14 assert(50 == __msan_test_shadow(buf, sizeof(buf)));
15 return 0;