]> git.proxmox.com Git - rustc.git/blame - src/libcompiler_builtins/compiler-rt/test/msan/ftime.cc
New upstream version 1.25.0+dfsg1
[rustc.git] / src / libcompiler_builtins / compiler-rt / test / msan / ftime.cc
CommitLineData
92a42be0
SL
1// RUN: %clangxx_msan -O0 -g %s -o %t && %run %t
2
2c00a5a8
XL
3// ftime() is deprecated on FreeBSD and NetBSD.
4// UNSUPPORTED: freebsd, netbsd
1a4d82fc
JJ
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(&tb);
14 assert(!res);
15 assert(__msan_test_shadow(&tb, sizeof(tb)) == -1);
16 return 0;
17}