[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:23:30 PST 2025


================
@@ -2115,12 +2115,11 @@ 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))) &&
+      ( // OpenMP 5.2, 5.1.1: Assumed-size arrays are shared
+          !semantics::IsAssumedSizeArray(*sym) ||
+          // If CrayPointer is among the DSA list then the
+          // CrayPointee is Privatizable
+          sym->test(Symbol::Flag::CrayPointee)) &&
----------------
Thirumalai-Shaktivel wrote:

Here, would checking only for CrayPointee be right?



https://github.com/llvm/llvm-project/pull/123171


More information about the flang-commits mailing list