diff --git a/flang/lib/semantics/check-omp-structure.cc b/flang/lib/semantics/check-omp-structure.cc index 1a75159acea5..9efd1dbccebd 100644 --- a/flang/lib/semantics/check-omp-structure.cc +++ b/flang/lib/semantics/check-omp-structure.cc @@ -454,6 +454,10 @@ void OmpStructureChecker::Enter(const parser::OpenMPBlockConstruct &x) { SetContextAllowedOnce({OmpClause::DEVICE}); SetContextRequired({OmpClause::MAP}); } break; + // 2.13.1 master (no clauses are allowed) + case parser::OmpBlockDirective::Directive::Master: + PushContext(beginDir.source, OmpDirective::MASTER); + break; default: // TODO others break;