Skip to content

Commit

Permalink
[Flang][OpenMP] Fixed semantic error when list item with a private da…
Browse files Browse the repository at this point in the history
…ta-sharing clause used in 'allocate' clause of 'taskgroup' construct
  • Loading branch information
Kaviya Rajendiran authored and Kaviya Rajendiran committed Sep 24, 2024
1 parent 777187b commit 076ded0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions flang/lib/Semantics/resolve-directives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1544,8 +1544,7 @@ bool OmpAttributeVisitor::Pre(const parser::OpenMPBlockConstruct &x) {
// The omp_taskgroup directive doesn't have its own data-sharing clauses.
// It inherits data-sharing attributes from the surrounding context.
// Therefore, don't clear the data-sharing attributes if it's an omp taskgroup
if (beginDir.v != llvm::omp::Directive::OMPD_taskgroup)
{
if (beginDir.v != llvm::omp::Directive::OMPD_taskgroup) {
ClearDataSharingAttributeObjects();
ClearPrivateDataSharingAttributeObjects();
}
Expand Down

0 comments on commit 076ded0

Please sign in to comment.