1// RUN: %clangxx_msan -O0 -g %s -o %t && %run %t
2
3// ftime() is deprecated on FreeBSD and NetBSD.
4// UNSUPPORTED: target={{.*(freebsd|netbsd).*}}
5
6#include <assert.h>
7#include <sys/timeb.h>
8
9#include <sanitizer/msan_interface.h>
10
11int main(void) {
12 struct timeb tb;
13 int res = ftime(timebuf: &tb);
14 assert(!res);
15 assert(__msan_test_shadow(&tb, sizeof(tb)) == -1);
16 return 0;
17}
18

source code of compiler-rt/test/msan/ftime.cpp