free (umem);
main (void){  const char *file;  int fd;  struct stat st;  int result;  char *inmem;  char *outmem;  size_t inlen;  size_t outlen;  mtrace ();  /* Make the content of the file available in memory.  */  file = "../ChangeLog.8";  fd = open (file, O_RDONLY);  if (fd == -1)    error (EXIT_FAILURE, errno, "cannot open %s", basename (file));  if (fstat (fd, &st) != 0)    error (EXIT_FAILURE, errno, "cannot stat %s", basename (file));  memlen = st.st_size;  mem = (char *) malloc (memlen + 1);  if (mem == NULL)    error (EXIT_FAILURE, errno, "while allocating buffer");  if (read (fd, mem, memlen) != memlen)    error (EXIT_FAILURE, 0, "cannot read entire file");  mem[memlen] = '\0';  close (fd);  /* For the second test we have to convert the file content to UTF-8.  */  umem = (char *) calloc (2, memlen);  if (umem == NULL)    error (EXIT_FAILURE, errno, "while allocating buffer");  cd = iconv_open ("UTF-8", "ISO-8859-1");  if (cd == (iconv_t) -1)    error (EXIT_FAILURE, errno, "cannot get conversion descriptor");  inmem = mem;  inlen = memlen;  outmem = umem;  outlen = 2 * memlen;  iconv (cd, &inmem, &inlen, &outmem, &outlen);  if (inlen != 0)    error (EXIT_FAILURE, errno, "cannot convert buffer");#ifdef _POSIX_CPUTIME  /* See whether we can use the CPU clock.  */  use_clock = clock_getcpuclockid (0, &cl) == 0;#endif  /* Run the actual tests.  All tests are run in a single-byte and a     multi-byte locale.  */  result = test_expr ("[]", 2);  result |= test_expr ("G.ran", 2);  result |= test_expr ("G.\\{1\\}ran", 2);#ifdef DOES_NOT_WORK  result |= test_expr ("G.*ran", 2);#endif  /* Free the resources.  */  iconv_close (cd);  free (mem);  return result;}