1 // RUN: %clang %s -emit-llvm %O0opt -c -o %t1.bc 2 // RUN: rm -rf %t.klee-out 3 // RUN: %klee --output-dir=%t.klee-out --exit-on-error --libc=klee %t1.bc 4 5 // just make sure __cxa_thread_atexit_impl works ok 6 7 #include <assert.h> 8 9 extern int __cxa_thread_atexit_impl(void (*)(void*), void*, void *); 10 11 static int x; // a global whose address we can take 12 boo(void * h)13void boo(void *h) { 14 assert(h == (void*)&x); 15 } 16 main()17int main() { 18 __cxa_thread_atexit_impl(boo, (void*)&x, (void*)0); 19 return 0; 20 } 21