]> git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/msan/ftime.cc
Imported Upstream version 1.6.0+dfsg1
[rustc.git] / src / compiler-rt / test / msan / ftime.cc
1 // RUN: %clangxx_msan -O0 -g %s -o %t && %run %t
2
3 // ftime() is deprecated on FreeBSD.
4 // XFAIL: freebsd
5
6 #include <assert.h>
7 #include <sys/timeb.h>
8
9 #include <sanitizer/msan_interface.h>
10
11 int main(void) {
12 struct timeb tb;
13 int res = ftime(&tb);
14 assert(!res);
15 assert(__msan_test_shadow(&tb, sizeof(tb)) == -1);
16 return 0;
17 }