Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / msan / scanf-allocate.cpp
bloba525b0c4ab9c390fc6558948ce42d76c1f8f454e
1 // RUN: %clangxx_msan -O0 %s -o %t && %run %t >%t.out 2>&1
2 // FileCheck %s <%t.out
4 #include <sanitizer/msan_interface.h>
5 #include <stdio.h>
6 #include <string.h>
8 int main(int argc, char **argv) {
9 char *str;
10 sscanf("#string#", "%ms", &str);
11 printf("str = %s\n", str);
12 __msan_check_mem_is_initialized(str, strlen(str) + 1);
13 // CHECK: #string#