[clang] Fix for codegen Crash in Clang when using locator omp_all_memory with depobj construct (PR #114221)

via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 7 07:58:32 PST 2024


================
@@ -17,6 +17,15 @@
 typedef void *omp_depend_t;
 
 void foo() {}
+void tmainc(){
+   omp_depend_t obj;
+#pragma omp depobj(obj) depend(inout: omp_all_memory)
+{
+   volatile omp_depend_t temp = obj;
+    char* char_ptr = reinterpret_cast<char*>(temp);
+    char_ptr[0] = 1;
+}
----------------
chandraghale wrote:

@shiltian  Is this correct for what you asked ? 

https://github.com/llvm/llvm-project/pull/114221


More information about the cfe-commits mailing list