Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / msan / fstatat64.cpp
blob253299c45669456ec89e4a5e019ec213566c09c3
1 // REQUIRES: linux
2 // RUN: %clangxx_msan -O0 %s -o %t && %run %t
4 #include <cassert>
5 #include <cstdlib>
6 #include <fcntl.h>
7 #include <sys/stat.h>
9 int main(void) {
10 struct stat64 st;
11 int dirfd = open("/dev", O_RDONLY);
12 if (fstatat64(dirfd, "null", &st, 0))
13 exit(1);
15 assert(S_ISCHR(st.st_mode));
17 return 0;