1// RUN: %clangxx_msan -O0 %s -o %t && %run %t %p
2
3#include <assert.h>
4#include <glob.h>
5#include <stdio.h>
6#include <stdlib.h>
7#include <termios.h>
8#include <unistd.h>
9
10int main(int argc, char *argv[]) {
11 int fd = getpt();
12 assert(fd >= 0);
13
14 struct termios t;
15 int res = tcgetattr(fd: fd, termios_p: &t);
16 assert(!res);
17
18 if (t.c_iflag == 0)
19 exit(status: 0);
20 return 0;
21}
22

source code of compiler-rt/test/msan/Linux/tcgetattr.cpp