[flang-commits] [flang] [flang][OpenMP] Don't try to privatize FORALL/DO CONCURRENT indices (PR #123341)

Leandro Lupori via flang-commits flang-commits at lists.llvm.org
Fri Jan 17 13:46:19 PST 2025


================
@@ -1777,28 +1777,13 @@ void OmpAttributeVisitor::ResolveSeqLoopIndexInParallelOrTaskConstruct(
 // Use of DO CONCURRENT inside OpenMP construct is unspecified behavior
 // till OpenMP-5.0 standard.
 // In above both cases we skip the privatization of iteration variables.
-// [OpenMP 5.1] DO CONCURRENT indices are private
----------------
luporl wrote:

I guess it would be better to include a comment like the one below to explain why nothing is done for DO CONCURRENT in this function:

// DO CONCURRENT indices have predetermined private DSA, but as they are
// defined in the construct itself, and OpenMP directives may not appear in it,
// they are already private.

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


More information about the flang-commits mailing list