1 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
2 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
3 // RUN: %clangxx_msan -fsanitize-memory-track-origins -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
5 // Test condition origin propagation through "select" IR instruction.
10 __attribute__((noinline
))
11 int *max_by_ptr(int *a
, int *b
) {
12 return *a
< *b
? b
: a
;
17 int *volatile px
= &x
;
19 int *p
= max_by_ptr(px
, &y
);
20 // CHECK: Uninitialized value was created by an allocation of 'x' in the stack frame of function 'main'