Greg Fitzgerald b8aae5405b Add %run to all lit tests
llvm-svn: 207709
2014-04-30 21:34:17 +00:00

18 lines
296 B
C++

// RUN: %clangxx_msan -m64 -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;
}