Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / sanitizer_common / TestCases / Posix / realpath.cpp
blob0a2287dbe04401ca895a7b97fb8e9f487bce2f93
1 // RUN: %clangxx -O0 %s -o %t && %run %t m1 2>&1 | FileCheck %s
3 #include <limits.h>
4 #include <stdio.h>
5 #include <stdlib.h>
7 char buff[1 << 12];
8 int main(int argc, char *argv[]) {
9 printf("REALPATH %s\n", realpath(argv[0], buff));
10 // CHECK: REALPATH /{{.+}}/realpath.cpp
12 char *buff2 = realpath(argv[0], nullptr);
13 printf("REALPATH %s\n", buff2);
14 // CHECK: REALPATH /{{.+}}/realpath.cpp
15 free(buff2);
17 buff2 = realpath(".", nullptr);
18 printf("REALPATH %s\n", buff2);
19 // CHECK: REALPATH /{{.+}}
20 free(buff2);