[flang] Apply the check for the constraint `C1172` to more stmts
authorKatherine Rasmussen <krasmussen@lbl.gov>
Wed, 17 May 2023 00:55:01 +0000 (17:55 -0700)
committerKatherine Rasmussen <krasmussen@lbl.gov>
Thu, 18 May 2023 02:38:44 +0000 (19:38 -0700)
commit2d5ef39184a4f17d75b0cd640f442cc43fe7edfc
tree939c8e42a4657a67a940831a16d9799d0019fdf0
parentdf64272c7bdba91493a21fc13c7fdedb3686cc77
[flang] Apply the check for the constraint `C1172` to more stmts

Apply the check for the constraint `C1172` to `unlock-stmt`,
`change-team-stmt`, `end-team-stmt`, and `critical-stmt`, which
all have `sync-stat-lists` and so `C1172` applies to them. Add
a test to check the `sync-stat-lists` for these 4 statements.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D150745
flang/lib/Semantics/check-coarray.cpp
flang/lib/Semantics/check-coarray.h
flang/test/Semantics/sync-stat-list.f90 [new file with mode: 0644]