]> git.proxmox.com Git - rustc.git/blame - src/libcompiler_builtins/compiler-rt/test/msan/times.cc
New upstream version 1.28.0+dfsg1
[rustc.git] / src / libcompiler_builtins / compiler-rt / test / msan / times.cc
CommitLineData
92a42be0 1// RUN: %clangxx_msan -O0 -g %s -o %t && %run %t
1a4d82fc
JJ
2
3#include <assert.h>
4#include <stdlib.h>
5#include <stdio.h>
6#include <sys/times.h>
7
8
9int main(void) {
10 struct tms t;
11 clock_t res = times(&t);
12 assert(res != (clock_t)-1);
13
14 if (t.tms_utime) printf("1\n");
15 if (t.tms_stime) printf("2\n");
16 if (t.tms_cutime) printf("3\n");
17 if (t.tms_cstime) printf("4\n");
18
19 return 0;
20}