[flang-commits] [flang] [Flang] Remove redundant check for CrayPointer (PR #123171)
Thirumalai Shaktivel via flang-commits
flang-commits at lists.llvm.org
Thu Jan 16 01:05:45 PST 2025
https://github.com/Thirumalai-Shaktivel created https://github.com/llvm/llvm-project/pull/123171
Fix failure caused by this PR: https://github.com/llvm/llvm-project/pull/121028
Failure:
https://lab.llvm.org/buildbot/#/builders/89/builds/14474
>From c705905cbace97426589ef576957092701dad77e Mon Sep 17 00:00:00 2001
From: Thirumalai-Shaktivel <thirumalaishaktivel at gmail.com>
Date: Thu, 16 Jan 2025 09:02:53 +0000
Subject: [PATCH] [Flang] Remove redundant check for CrayPointer
---
flang/lib/Semantics/resolve-directives.cpp | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
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>() &&
More information about the flang-commits
mailing list