[clang] Fix for codegen Crash in Clang when using locator omp_all_memory with depobj construct (PR #114221)
Shilei Tian via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 7 06:02:59 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;
+}
----------------
shiltian wrote:
even though we don't enforce code format in test, could you just do it manually?
```
#pragma omp depobj(obj) depend(inout: omp_all_memory)
{
...
}
```
https://github.com/llvm/llvm-project/pull/114221
More information about the cfe-commits
mailing list