[flang-commits] [flang] [flang][OpenMP] Skip default privatization for crashing cases (PR #71922)
via flang-commits
flang-commits at lists.llvm.org
Fri Nov 10 03:08:30 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-fir-hlfir
Author: None (NimishMishra)
<details>
<summary>Changes</summary>
This patch skips default privatization for crashing cases like namelists, reduction instrinsics, and structure constructor.
Fixes: https://github.com/llvm/llvm-project/issues/67332, https://github.com/llvm/llvm-project/issues/66454, and https://github.com/llvm/llvm-project/issues/65569
Co-Authored-By: kiranchandramohan <kiran.chandramohan@<!-- -->arm.com>
---
Full diff: https://github.com/llvm/llvm-project/pull/71922.diff
1 Files Affected:
- (modified) flang/lib/Lower/OpenMP.cpp (+4-1)
``````````diff
diff --git a/flang/lib/Lower/OpenMP.cpp b/flang/lib/Lower/OpenMP.cpp
index 945066549299d77..60db450d9be1508 100644
--- a/flang/lib/Lower/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP.cpp
@@ -483,7 +483,10 @@ void DataSharingProcessor::defaultPrivatize() {
for (const Fortran::semantics::Symbol *sym : defaultSymbols) {
if (!symbolsInNestedRegions.contains(sym) &&
!symbolsInParentRegions.contains(sym) &&
- !privatizedSymbols.contains(sym)) {
+ !privatizedSymbols.contains(sym) &&
+ !Fortran::semantics::IsProcedure(*sym) &&
+ !sym->GetUltimate().has<Fortran::semantics::DerivedTypeDetails>() &&
+ !sym->GetUltimate().has<Fortran::semantics::NamelistDetails>()) {
cloneSymbol(sym);
copyFirstPrivateSymbol(sym);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/71922
More information about the flang-commits
mailing list