diff options
Diffstat (limited to 'flang/lib/Semantics/check-omp-structure.cpp')
| -rw-r--r-- | flang/lib/Semantics/check-omp-structure.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp index 76dfd40c6a62..f9d645dc2e78 100644 --- a/flang/lib/Semantics/check-omp-structure.cpp +++ b/flang/lib/Semantics/check-omp-structure.cpp @@ -4420,6 +4420,13 @@ void OmpStructureChecker::Enter(const parser::OmpClause::Depend &x) { CheckDoacross(*doaDep); CheckDependenceType(doaDep->GetDepType()); } else { + using Modifier = parser::OmpDependClause::TaskDep::Modifier; + auto &modifiers{std::get<std::optional<std::list<Modifier>>>(taskDep->t)}; + if (!modifiers) { + context_.Say(GetContext().clauseSource, + "A DEPEND clause on a TASK construct must have a valid task dependence type"_err_en_US); + return; + } CheckTaskDependenceType(taskDep->GetTaskDepType()); } |
