1 // Regression test for origin propagation in "select i1, float, float".
2 // https://code.google.com/p/memory-sanitizer/issues/detail?id=78
4 // RUN: %clangxx_msan -O2 -fsanitize-memory-track-origins %s -o %t && not %run %t >%t.out 2>&1
5 // RUN: FileCheck %s < %t.out
7 // RUN: %clangxx_msan -O2 -fsanitize-memory-track-origins=2 %s -o %t && not %run %t >%t.out 2>&1
8 // RUN: FileCheck %s < %t.out
11 #include <sanitizer/msan_interface.h>
14 volatile bool b
= true;
16 __msan_allocated_memory(&x
, sizeof(x
));
17 __msan_allocated_memory(&y
, sizeof(y
));
19 if (z
> 0) printf(".\n");
20 // CHECK: Memory was marked as uninitialized
21 // CHECK: {{#0 0x.* in .*__msan_allocated_memory}}
22 // CHECK: {{#1 0x.* in main .*select_float_origin.cpp:}}[[@LINE-6]]