[flang-commits] [flang] [Flang][OpenMP] Fixed semantic error when list item with a private da… (PR #109775)

Kaviya Rajendiran via flang-commits flang-commits at lists.llvm.org
Tue Oct 8 23:24:33 PDT 2024


kaviya2510 wrote:

> he ALLOCATE clause must be on the same directive that has the privatizing clause. It specifies how to allocate memory for the private copy, so adding it in a nested construct is questionable.



> Please could you add a reference to the relevant clause of the standard to the commit description and/or a code comment. I am finding this difficult to find.

Hi @tblah,
Thanks for the comments. 
[Taskgroup](https://www.openmp.org/spec-html/5.2/openmpse92.html#:~:text=The%20taskgroup%20construct%20speci%EF%AC%81es%20a%20wait%20on%20completion,occurs%20at%20the%20end%20of%20the%20taskgroup%20region.)
Kindly refer the above link for taskgroup directive.
According to the OpenMP standard, the allocate clause must be used on the same directive that has the private data-sharing clause. However, in this case, the taskgroup directive only supports the allocate and task_reduction clauses, making it impossible to specify the data-sharing attribute of a variable within the taskgroup directive.

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


More information about the flang-commits mailing list