repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
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
blob
705ca2e981cb21376c6405f4e9a37b6acafc085f
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\)$}}
6
7
#include <assert.h>
8
#include <stdio.h>
9
10
int
main
(
void
) {
11
assert
(
fputs
(
NULL
,
stdout
) >=
0
);
12
fputs
(
"---"
,
stdout
);
13
assert
(
puts
(
NULL
) >=
0
);
14
15
return
0
;
16
}