Andrew Top | 61a8495 | 2019-04-30 15:07:33 -0700 | [diff] [blame] | 1 | // RUN: %clangxx -O0 -g %s -o %t && %run %t |
2 | |||||
3 | #include <stdlib.h> | ||||
4 | #include <sys/stat.h> | ||||
5 | |||||
6 | int main(void) { | ||||
7 | struct stat st; | ||||
8 | |||||
9 | if (lstat("/dev/null", &st)) | ||||
10 | exit(1); | ||||
11 | |||||
12 | if (!S_ISCHR(st.st_mode)) | ||||
13 | exit(1); | ||||
14 | |||||
15 | return 0; | ||||
16 | } |