[X86] Extend #118680 - support f16/bf16 fabs/fneg load-store patterns
[llvm-project.git] / lldb / test / Shell / Process / Windows / exception_access_violation.cpp
blob93898a1991bc6d591d5aa5747afb0d43d9cffabe
1 // clang-format off
3 // REQUIRES: target-windows
4 // RUN: %build --compiler=clang-cl -o %t.exe -- %s
5 // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -o "run" -- write | FileCheck --check-prefix=WRITE %s
6 // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -o "run" -- read | FileCheck --check-prefix=READ %s
8 #include <string.h>
10 int access_violation_write(void* addr) {
11 *(int*)addr = 42;
12 return 0;
16 int access_violation_read(void* addr) {
17 volatile int ret = *(int*)addr;
18 return ret;
21 int main(int argc, char *argv[]) {
22 if (argc < 2) {
23 return 1;
25 if (strcmp(argv[1], "write") == 0) {
26 return access_violation_write((void*)42);
28 if (strcmp(argv[1], "read") == 0) {
29 return access_violation_read((void*)42);
31 return 1;
35 // WRITE: * thread #1, stop reason = Exception 0xc0000005 encountered at address {{.*}}: Access violation writing location 0x0000002a
37 // READ: * thread #1, stop reason = Exception 0xc0000005 encountered at address {{.*}}: Access violation reading location 0x0000002a