brintos

brintos / llvm-project-archived public Read only

0
0
Text · 306 B · e26aad8 Raw
16 lines · c
1// RUN: %clang %s -o %t && %run %t 2>&12 3#include <assert.h>4#include <stdlib.h>5#include <wchar.h>6 7int 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;15}16