Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / sanitizer_common / TestCases / Darwin / fputs_puts_null.cpp
blob705ca2e981cb21376c6405f4e9a37b6acafc085f
1 // On Darwin, the man page states that "both fputs() and puts() print `(null)'
2 // if str is NULL."
3 //
4 // RUN: %clangxx -g %s -o %t && %run %t | FileCheck %s
5 // CHECK: {{^\(null\)---\(null\)$}}
7 #include <assert.h>
8 #include <stdio.h>
10 int main(void) {
11 assert(fputs(NULL, stdout) >= 0);
12 fputs("---", stdout);
13 assert(puts(NULL) >= 0);
15 return 0;