Skip to content

Commit 134129c

Browse files
[Flang] Remove redundant check for CrayPointer
1 parent f711aa9 commit 134129c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

flang/lib/Semantics/resolve-directives.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2115,12 +2115,11 @@ void OmpAttributeVisitor::Post(const parser::OpenMPAllocatorsConstruct &x) {
21152115
static bool IsPrivatizable(const Symbol *sym) {
21162116
auto *misc{sym->detailsIf<MiscDetails>()};
21172117
return IsVariableName(*sym) && !IsProcedure(*sym) && !IsNamedConstant(*sym) &&
2118-
(!semantics::IsAssumedSizeArray(
2119-
*sym) || /* OpenMP 5.2, 5.1.1: Assumed-size arrays are shared*/
2120-
(sym->test(Symbol::Flag::CrayPointee) &&
2121-
// If CrayPointer is among the DSA list then the
2122-
// CrayPointee is Privatizable
2123-
&semantics::GetCrayPointer(*sym))) &&
2118+
( // OpenMP 5.2, 5.1.1: Assumed-size arrays are shared
2119+
!semantics::IsAssumedSizeArray(*sym) ||
2120+
// If CrayPointer is among the DSA list then the
2121+
// CrayPointee is Privatizable
2122+
sym->test(Symbol::Flag::CrayPointee)) &&
21242123
!sym->owner().IsDerivedType() &&
21252124
sym->owner().kind() != Scope::Kind::ImpliedDos &&
21262125
!sym->detailsIf<semantics::AssocEntityDetails>() &&

0 commit comments

Comments
 (0)