[flang-commits] [flang] [Flang] Remove redundant check for CrayPointer (PR #123171)
via flang-commits
flang-commits at lists.llvm.org
Thu Jan 16 01:06:34 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-semantics
Author: Thirumalai Shaktivel (Thirumalai-Shaktivel)
<details>
<summary>Changes</summary>
Fix failure caused by this PR: https://github.com/llvm/llvm-project/pull/121028
Failure:
https://lab.llvm.org/buildbot/#/builders/89/builds/14474
---
Full diff: https://github.com/llvm/llvm-project/pull/123171.diff
1 Files Affected:
- (modified) flang/lib/Semantics/resolve-directives.cpp (+4-6)
``````````diff
diff --git a/flang/lib/Semantics/resolve-directives.cpp b/flang/lib/Semantics/resolve-directives.cpp
index 9cbc61391ba1fb..85159cb5ce0685 100644
--- a/flang/lib/Semantics/resolve-directives.cpp
+++ b/flang/lib/Semantics/resolve-directives.cpp
@@ -2115,12 +2115,10 @@ void OmpAttributeVisitor::Post(const parser::OpenMPAllocatorsConstruct &x) {
static bool IsPrivatizable(const Symbol *sym) {
auto *misc{sym->detailsIf<MiscDetails>()};
return IsVariableName(*sym) && !IsProcedure(*sym) && !IsNamedConstant(*sym) &&
- (!semantics::IsAssumedSizeArray(
- *sym) || /* OpenMP 5.2, 5.1.1: Assumed-size arrays are shared*/
- (sym->test(Symbol::Flag::CrayPointee) &&
- // If CrayPointer is among the DSA list then the
- // CrayPointee is Privatizable
- &semantics::GetCrayPointer(*sym))) &&
+ (!semantics::IsAssumedSizeArray(*sym) /* OpenMP 5.2, 5.1.1: Assumed-size
+ arrays are shared */ ||
+ sym->test(Symbol::Flag::CrayPointee) /* If CrayPointer is among the
+ DSA list then the CrayPointee is Privatizable */) &&
!sym->owner().IsDerivedType() &&
sym->owner().kind() != Scope::Kind::ImpliedDos &&
!sym->detailsIf<semantics::AssocEntityDetails>() &&
``````````
</details>
https://github.com/llvm/llvm-project/pull/123171
More information about the flang-commits
mailing list