Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / asan / TestCases / printf-m.c
blobf7a564b02f2ec5e22e225c803babe033d6e0e039
1 // RUN: %clang_asan -O2 %s -o %t && %run %t
3 // FIXME: printf is not intercepted on Windows yet.
4 // UNSUPPORTED: target={{.*windows-msvc.*}}
6 #include <stdio.h>
8 int main() {
9 char s[5] = {'w', 'o', 'r', 'l', 'd'};
10 // Test that %m does not consume an argument. If it does, %s would apply to
11 // the 5-character buffer, resulting in a stack-buffer-overflow report.
12 printf("%m %s, %.5s\n", "hello", s);
13 return 0;