1 // RUN: %clang_dfsan %s -o %t
2 // RUN: not %run %t 2>&1 | FileCheck %s
3 // RUN: %run %t foo
4 //
5 // REQUIRES: x86_64-target-arch
6 
7 #include <stdio.h>
8 
do_nothing(const char * format,...)9 int do_nothing(const char *format, ...) {
10   return 0;
11 }
12 
main(int argc,char ** argv)13 int main(int argc, char **argv) {
14   int (*fp)(const char *, ...);
15 
16   if (argc > 1)
17     fp = do_nothing;
18   else
19     fp = printf;
20 
21   // CHECK: FATAL: DataFlowSanitizer: unsupported indirect call to vararg function printf
22   fp("hello %s\n", "world");
23 }
24