xref: /llvm-project/compiler-rt/test/msan/fstat.cpp (revision d21b3d346af2f6189638d853182e389555e7ccb9)
1 // RUN: %clangxx_msan -O0 %s -o %t && %run %t
2 
3 #include <sys/stat.h>
4 #include <stdlib.h>
5 
main(void)6 int main(void) {
7   struct stat st;
8   if (fstat(0, &st))
9     exit(1);
10 
11   if (S_ISBLK(st.st_mode))
12     exit(0);
13 
14   return 0;
15 }
16