blob: caff80c2e5d740f3417b20c806752be0664d6bf8 [file] [log] [blame]
Evgeniy Stepanov745dd0d2013-06-07 13:00:47 +00001// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %t
2// RUN: %clangxx_msan -m64 -O3 -g %s -o %t && %t
3
4#include <assert.h>
5#include <stdlib.h>
6#include <sys/ioctl.h>
7#include <sys/socket.h>
8#include <unistd.h>
9
10int main(int argc, char **argv) {
11 int fd = socket(AF_INET, SOCK_DGRAM, 0);
12
13 unsigned int z;
14 int res = ioctl(fd, FIOGETOWN, &z);
15 assert(res == 0);
16 close(fd);
17 if (z)
18 exit(0);
19 return 0;
20}