[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)
Shilei Tian via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 12 07:07:11 PST 2024
================
@@ -0,0 +1,11 @@
+// REQUIRES: asserts
+
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-cpu x86-64 -disable-llvm-passes -fopenmp-targets=amdgcn-amd-amdhsa -x c++ -emit-llvm-bc %s -o %t-x86-host.bc
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-linux-gnu -target-cpu gfx906 -fopenmp -nogpulib -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-x86-host.bc -x c++ %s
+
+// Don't crash with assertions build.
+int MyGlobVar;
+#pragma omp threadprivate(MyGlobVar)
----------------
shiltian wrote:
This should not crash for sure, but I wonder is this a valid use of OpenMP? I don't know what I should expect from this semantics.
https://github.com/llvm/llvm-project/pull/119246
More information about the cfe-commits
mailing list