repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git]
/
compiler-rt
/
test
/
msan
/
fstatat64.cpp
blob
253299c45669456ec89e4a5e019ec213566c09c3
1
// REQUIRES: linux
2
// RUN: %clangxx_msan -O0 %s -o %t && %run %t
3
4
#include <cassert>
5
#include <cstdlib>
6
#include <fcntl.h>
7
#include <sys/stat.h>
8
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
);
14
15
assert
(
S_ISCHR
(
st
.
st_mode
));
16
17
return
0
;
18
}