Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / sanitizer_common / TestCases / Posix / fgets.cpp
blob6a639f8047db395f7239648a42938d3b22dec09a
1 // RUN: %clangxx -g %s -o %t && %run %t
3 #include <assert.h>
4 #include <stdio.h>
6 int main(int argc, char **argv) {
7 FILE *fp = fopen(argv[0], "r");
8 assert(fp);
10 char buf[2];
11 char *s = fgets(buf, sizeof(buf), fp);
12 assert(s);
14 assert(!fclose(fp));
15 return 0;