[flang-commits] [flang] [Flang][OpenMP] Do not default privatize symbols that are not variables (PR #117886)

Leandro Lupori via flang-commits flang-commits at lists.llvm.org
Wed Nov 27 07:33:28 PST 2024


================
@@ -2112,7 +2112,7 @@ void OmpAttributeVisitor::Post(const parser::OpenMPAllocatorsConstruct &x) {
 
 static bool IsPrivatizable(const Symbol *sym) {
   auto *misc{sym->detailsIf<MiscDetails>()};
-  return !IsProcedure(*sym) && !IsNamedConstant(*sym) &&
+  return IsVariableName(*sym) && !IsProcedure(*sym) && !IsNamedConstant(*sym) &&
----------------
luporl wrote:

Right, it should be OK to remove at least `!IsNamedConstant(*sym)`, probably `!IsProcedure(*sym)` too.

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


More information about the flang-commits mailing list