]>
Commit | Line | Data |
---|---|---|
92a42be0 | 1 | // RUN: %clangxx_msan -O0 %s -o %t && not %run %t >%t.out 2>&1 |
1a4d82fc | 2 | // RUN: FileCheck %s < %t.out |
92a42be0 | 3 | // RUN: %clangxx_msan -O1 %s -o %t && not %run %t >%t.out 2>&1 |
1a4d82fc | 4 | // RUN: FileCheck %s < %t.out |
92a42be0 | 5 | // RUN: %clangxx_msan -O2 %s -o %t && not %run %t >%t.out 2>&1 |
1a4d82fc | 6 | // RUN: FileCheck %s < %t.out |
92a42be0 | 7 | // RUN: %clangxx_msan -O3 %s -o %t && not %run %t >%t.out 2>&1 |
1a4d82fc JJ |
8 | // RUN: FileCheck %s < %t.out |
9 | ||
10 | #include <stdlib.h> | |
11 | int main(int argc, char **argv) { | |
12 | int x; | |
13 | int *volatile p = &x; | |
14 | int z = *p ? 1 : 0; | |
15 | if (z) | |
16 | exit(0); | |
17 | // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value | |
18 | // CHECK: {{#0 0x.* in main .*select.cc:}}[[@LINE-3]] | |
19 | ||
20 | // CHECK: SUMMARY: MemorySanitizer: use-of-uninitialized-value {{.*select.cc:.* main}} | |
21 | return 0; | |
22 | } |