Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / sanitizer_common / TestCases / Posix / sl_add.cpp
blob6c14add8c40780d4f0a4bc30504951663fd9c73f
1 // RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
2 //
3 // UNSUPPORTED: darwin, target={{.*(linux|solaris).*}}
5 #include <assert.h>
6 #include <errno.h>
7 #include <stdio.h>
8 #include <string.h>
9 #include <stringlist.h>
11 int main(void) {
12 printf("sl_add\n");
14 StringList *sl = sl_init();
15 assert(sl);
16 char *p = strdup("entry");
17 assert(!sl_add(sl, p));
18 char *entry = sl_find(sl, "entry");
19 assert(!strcmp(entry, p));
20 printf("Found '%s'\n", entry);
21 sl_free(sl, 1);
23 return 0;
24 // CHECK: sl_add
25 // CHECK: Found '{{.*}}'