Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / sanitizer_common / TestCases / Posix / wcsxfrm.c
blob3e349c75f40900f436112393a94e4a944ada9a92
1 // RUN: %clang -O0 %s -o %t && %run %t
2 // UNSUPPORTED: darwin
4 #include <assert.h>
5 #include <locale.h>
6 #include <wchar.h>
8 int main(int argc, char **argv) {
9 wchar_t q[10];
10 size_t n = wcsxfrm(q, L"abcdef", sizeof(q) / sizeof(wchar_t));
11 assert(n < sizeof(q));
13 wchar_t q2[10];
14 locale_t loc = newlocale(LC_ALL_MASK, "", (locale_t)0);
15 n = wcsxfrm_l(q2, L"qwerty", sizeof(q) / sizeof(wchar_t), loc);
16 assert(n < sizeof(q2));
18 freelocale(loc);
19 return 0;