[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / compiler-rt / test / msan / rand_r.cpp
blobd83c43a6d85cdcc1a6e48c211d9461c7eb9a3e4c
1 // RUN: %clangxx_msan -O0 -g %s -o %t && %run %t
2 // RUN: %clangxx_msan -O0 -g -DUNINIT %s -o %t && not %run %t 2>&1 | FileCheck %s
4 #include <assert.h>
5 #include <stdio.h>
6 #include <stdlib.h>
8 int main(void) {
9 unsigned seed;
10 #ifndef UNINIT
11 seed = 42;
12 #endif
13 int v = rand_r(&seed);
14 // CHECK: MemorySanitizer: use-of-uninitialized-value
15 // CHECK: in main{{.*}}rand_r.cpp:[[@LINE-2]]
16 if (v) printf(".\n");
17 return 0;