xref: /llvm-project/compiler-rt/test/msan/stat64.cpp (revision 1f82d0f795d11376adf3e62fc35fd98bb46e82b0)
1 // REQUIRES: linux
2 // RUN: %clangxx_msan -O0 %s -o %t && %run %t
3 
4 #include <cassert>
5 #include <cstdlib>
6 #include <sys/stat.h>
7 
main(void)8 int main(void) {
9   struct stat64 st;
10   if (stat64("/dev/null", &st))
11     exit(1);
12 
13   assert(S_ISCHR(st.st_mode));
14 
15   return 0;
16 }
17