Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / msan / Linux / eventfd.cpp
blob4399211258fff1bad3b716a1efdd31f109821919
1 // RUN: %clangxx_msan -O0 %s -o %t && %run %t 2>&1
3 #include <assert.h>
4 #include <sys/eventfd.h>
6 #include <sanitizer/msan_interface.h>
8 int main(int argc, char *argv[]) {
9 int efd = eventfd(42, 0);
10 assert(efd >= 0);
12 eventfd_t v;
13 int ret = eventfd_read(efd, &v);
14 assert(ret == 0);
15 __msan_check_mem_is_initialized(&v, sizeof(v));
17 assert(v == 42);