Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / sanitizer_common / TestCases / NetBSD / fparseln.cpp
blob8a71d5fcdadcd046c51570d896b8dfaa77afd5d7
1 // RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
3 #include <assert.h>
4 #include <stdio.h>
5 #include <stdlib.h>
7 int main(void) {
8 printf("fparseln\n");
10 FILE *fp = fopen("/etc/fstab", "r");
11 assert(fp);
13 int flags = FPARSELN_UNESCALL;
14 const char *delim = "\\\\#";
15 size_t lineno = 0, len;
16 char *line;
17 while ((line = fparseln(fp, &len, &lineno, delim, flags))) {
18 printf("lineno: %zu, length: %zu, line: %s\n", lineno, len, line);
19 free(line);
22 // CHECK: fparseln
24 return 0;