diff options
Diffstat (limited to 'flang/lib/Semantics')
-rw-r--r-- | flang/lib/Semantics/check-coarray.cpp | 13 | ||||
-rw-r--r-- | flang/lib/Semantics/check-coarray.h | 6 |
2 files changed, 19 insertions, 0 deletions
diff --git a/flang/lib/Semantics/check-coarray.cpp b/flang/lib/Semantics/check-coarray.cpp index 688c3a7c92ad..31fa3088d16b 100644 --- a/flang/lib/Semantics/check-coarray.cpp +++ b/flang/lib/Semantics/check-coarray.cpp @@ -140,6 +140,11 @@ static void CheckEventVariable( void CoarrayChecker::Leave(const parser::ChangeTeamStmt &x) { CheckNamesAreDistinct(std::get<std::list<parser::CoarrayAssociation>>(x.t)); CheckTeamType(context_, std::get<parser::TeamValue>(x.t)); + CheckSyncStatList(context_, std::get<std::list<parser::StatOrErrmsg>>(x.t)); +} + +void CoarrayChecker::Leave(const parser::EndChangeTeamStmt &x) { + CheckSyncStatList(context_, std::get<std::list<parser::StatOrErrmsg>>(x.t)); } void CoarrayChecker::Leave(const parser::SyncAllStmt &x) { @@ -227,6 +232,14 @@ void CoarrayChecker::Leave(const parser::EventWaitStmt &x) { } } +void CoarrayChecker::Leave(const parser::UnlockStmt &x) { + CheckSyncStatList(context_, std::get<std::list<parser::StatOrErrmsg>>(x.t)); +} + +void CoarrayChecker::Leave(const parser::CriticalStmt &x) { + CheckSyncStatList(context_, std::get<std::list<parser::StatOrErrmsg>>(x.t)); +} + void CoarrayChecker::Leave(const parser::ImageSelector &imageSelector) { haveStat_ = false; haveTeam_ = false; diff --git a/flang/lib/Semantics/check-coarray.h b/flang/lib/Semantics/check-coarray.h index 51d030cbf771..251ee980d8a5 100644 --- a/flang/lib/Semantics/check-coarray.h +++ b/flang/lib/Semantics/check-coarray.h @@ -16,7 +16,9 @@ namespace Fortran::parser { class CharBlock; class MessageFixedText; struct ChangeTeamStmt; +struct CriticalStmt; struct CoarrayAssociation; +struct EndChangeTeamStmt; struct EventPostStmt; struct EventWaitStmt; struct FormTeamStmt; @@ -25,6 +27,7 @@ struct SyncAllStmt; struct SyncImagesStmt; struct SyncMemoryStmt; struct SyncTeamStmt; +struct UnlockStmt; } // namespace Fortran::parser namespace Fortran::semantics { @@ -33,12 +36,15 @@ class CoarrayChecker : public virtual BaseChecker { public: CoarrayChecker(SemanticsContext &context) : context_{context} {} void Leave(const parser::ChangeTeamStmt &); + void Leave(const parser::EndChangeTeamStmt &); void Leave(const parser::SyncAllStmt &); void Leave(const parser::SyncImagesStmt &); void Leave(const parser::SyncMemoryStmt &); void Leave(const parser::SyncTeamStmt &); void Leave(const parser::EventPostStmt &); void Leave(const parser::EventWaitStmt &); + void Leave(const parser::UnlockStmt &); + void Leave(const parser::CriticalStmt &); void Leave(const parser::ImageSelector &); void Leave(const parser::FormTeamStmt &); |