Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / sanitizer_common / TestCases / Posix / wcsdup.c
blobe26aad855621c37352d50cdc6a1ee9771be914df
1 // RUN: %clang %s -o %t && %run %t 2>&1
3 #include <assert.h>
4 #include <stdlib.h>
5 #include <wchar.h>
7 int main(int argc, char **argv) {
8 wchar_t *buff = wcsdup(L"foo");
9 assert(buff[0] == L'f');
10 assert(buff[1] == L'o');
11 assert(buff[2] == L'o');
12 assert(buff[3] == L'\0');
13 free(buff);
14 return 0;