1 // Verifies that speculative loads from unions do not happen under asan.
2 // RUN: %clangxx_asan -O0 %s -o %t && %run %t 2>&1
3 // RUN: %clangxx_asan -O1 %s -o %t && %run %t 2>&1
4 // RUN: %clangxx_asan -O2 %s -o %t && %run %t 2>&1
5 // RUN: %clangxx_asan -O3 %s -o %t && %run %t 2>&1
17 char *buf
= new char[2];
18 buf
[0] = buf
[1] = 0x0;
20 short result
= u
->q
== 0 ? 0 : u
->w
.y
;