Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / dfsan / vararg.c
blob966522a03623b38c2abaef254c90812653983f8c
1 // RUN: %clang_dfsan %s -o %t
2 // RUN: not %run %t 2>&1 | FileCheck %s
3 // RUN: %run %t foo
5 #include <stdio.h>
7 int do_nothing(const char *format, ...) {
8 return 0;
11 int main(int argc, char **argv) {
12 int (*fp)(const char *, ...);
14 if (argc > 1)
15 fp = do_nothing;
16 else
17 fp = printf;
19 // CHECK: FATAL: DataFlowSanitizer: unsupported indirect call to vararg function printf
20 fp("hello %s\n", "world");