Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / sanitizer_common / TestCases / Posix / lstat64.cpp
blob22ab3068274eea174b6d92f21ec540f659af02e1
1 // REQUIRES: linux
2 // RUN: %clangxx -O0 -g %s -o %t && %run %t
4 #include <assert.h>
5 #include <stdlib.h>
6 #include <sys/stat.h>
8 int main(void) {
9 struct stat64 st;
11 assert(!lstat64("/dev/null", &st));
12 #if defined(__sun__) && defined(__svr4__)
13 assert(S_ISLNK(st.st_mode));
14 #else
15 assert(S_ISCHR(st.st_mode));
16 #endif
18 return 0;