1 // Test -fsanitize-coverage=edge,indirect-call,trace-pc
2 // RUN: %clangxx_asan -O0 -DTRACE_RT %s -o %t-rt.o -c
3 // RUN: %clangxx_asan -O0 -fsanitize-coverage=edge,trace-pc,indirect-calls %s -o %t %t-rt.o
8 extern "C" void __sanitizer_cov_trace_pc() {
11 extern "C" void __sanitizer_cov_trace_pc_indir(void *callee
) {
18 extern void *last_callee
;
20 __attribute__((noinline
)) void foo() { printf("foo\n"); }
21 __attribute__((noinline
)) void bar() { printf("bar\n"); }
23 int main(int argc
, char **argv
) {
24 void (*f
)(void) = argc
? foo
: bar
;
29 assert(last_callee
== foo
);