1 // RUN: %libomptarget-compile-generic -DSHARED -fPIC -shared -o %t.so && %clang %flags %s -o %t -ldl && %libomptarget-run-generic %t.so 2>&1 | %fcheck-generic
8 printf("%s\n", "DONE.");
14 int main(int argc
, char **argv
) {
18 void *Handle
= dlopen(argv
[1], RTLD_NOW
);
22 printf("dlopen() failed: %s\n", dlerror());
25 Foo
= (int (*)(void))dlsym(Handle
, "foo");
27 printf("dlsym() failed: %s\n", dlerror());
31 // CHECK-NOT: {{abort|fault}}