Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / msan / dlerror.cpp
blobd5510b65c4a5b04f88d4692a4d3b29c1bc26b334
1 // RUN: %clangxx_msan -O0 %s -o %t && %run %t
3 #include <assert.h>
4 #include <dlfcn.h>
5 #include <stdio.h>
6 #include <string.h>
8 int main(void) {
9 void *p = dlopen("/bad/file/name", RTLD_NOW);
10 assert(!p);
11 char *s = dlerror();
12 printf("%s, %zu\n", s, strlen(s));
13 return 0;