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
/
sanitizer_common
/
TestCases
/
NetBSD
/
strmode.cpp
blob
b8d7d8ccf5a20041bc5d0112dbcd49f0a5098c0d
1
// RUN: %clangxx -O0 -g %s -o %t && %run %t
2
3
#include <stdio.h>
4
#include <stdlib.h>
5
#include <sys/stat.h>
6
#include <unistd.h>
7
8
int
main
(
void
) {
9
struct
stat st
;
10
char
modep
[
15
];
11
12
if
(
stat
(
"/etc/hosts"
, &
st
))
13
exit
(
1
);
14
15
strmode
(
st
.
st_mode
,
modep
);
16
17
printf
(
"%s
\n
"
,
modep
);
18
19
return
0
;
20
}