mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-10 10:01:42 +00:00
d06aa3dc00
Target-specific flags should usually be configured by CMake/lit. llvm-svn: 230999
18 lines
291 B
C++
18 lines
291 B
C++
// RUN: %clangxx_msan -O0 %s -o %t && %run %t
|
|
|
|
#include <assert.h>
|
|
#include <errno.h>
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
|
|
int main()
|
|
{
|
|
int x;
|
|
int *volatile p = &x;
|
|
errno = *p;
|
|
int res = read(-1, 0, 0);
|
|
assert(res == -1);
|
|
if (errno) printf("errno %d\n", errno);
|
|
return 0;
|
|
}
|