bolt/deps/llvm-18.1.8/compiler-rt/test/sanitizer_common/TestCases/NetBSD/strmode.cpp
2025-02-14 19:21:04 +01:00

20 lines
297 B
C++

// RUN: %clangxx -O0 -g %s -o %t && %run %t
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
int main(void) {
struct stat st;
char modep[15];
if (stat("/etc/hosts", &st))
exit(1);
strmode(st.st_mode, modep);
printf("%s\n", modep);
return 0;
}