[flang-commits] [flang] [FLANG][OMP] Add error message for invalid dependence type in taskwait construct (#219234). (PR #220837)
via flang-commits
flang-commits at lists.llvm.org
Thu Sep 3 01:04:29 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-openmp
@llvm/pr-subscribers-flang-semantics
Author: laoshd
<details>
<summary>Changes</summary>
This PR is to fix #<!-- -->219234.
---
Full diff: https://github.com/llvm/llvm-project/pull/220837.diff
1 Files Affected:
- (modified) flang/lib/Semantics/check-omp-structure.cpp (+8)
``````````diff
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp
index 274efa64d03d0..762c9bf8a9be7 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -5116,6 +5116,14 @@ void OmpStructureChecker::Enter(const parser::OmpClause::Depend &x) {
context_.Say(GetContext().clauseSource,
"The SINK and SOURCE dependence types can only be used with the ORDERED directive, used here in the %s construct"_err_en_US,
parser::omp::GetUpperName(dir, version));
+ } else if (dir == llvm::omp::OMPD_taskwait &&
+ taskDep->GetTaskDepType() ==
+ parser::OmpTaskDependenceType::Value::Mutexinoutset) {
+ // A depend clause on a taskwait construct must not have
+ // mutexinoutset as dependence-type.
+ context_.Say(GetContext().clauseSource,
+ "A DEPEND clause on a TASKWAIT construct must not have %s as dependence type"_err_en_US,
+ "MUTEXINOUTSET");
}
}
if (taskDep) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/220837
More information about the flang-commits
mailing list