This is an archive of the discontinued LLVM Phabricator instance.

[flang] Add check for constraints on synchronization-stmts
ClosedPublic

Authored by ktras on Oct 17 2022, 12:53 PM.

Details

Summary

In the CoarrayChecker, add checks for the constraints C1172 and
C1173, which constrain sync-stat-list. Add these checks to
sync-all-stmt, sync-images-stmt, sync-memory-stmt, and
sync-team-stmt. Also add a check for the constraint C1174 in
sync-images-stmt. Update semantics tests for these stmts.

The CheckCoindexedStatOrErrmsg function is a separate function from the
singular function that it is currently called from, because there are future changes planned
which will also need to call this function.

Diff Detail

Event Timeline

ktras created this revision.Oct 17 2022, 12:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 17 2022, 12:53 PM
Herald added a subscriber: jdoerfert. · View Herald Transcript
ktras requested review of this revision.Oct 17 2022, 12:53 PM
klausler added inline comments.Oct 17 2022, 4:37 PM
flang/lib/Semantics/check-coarray.cpp
85

Is there a numbered constraint in the standard that should appear in a comment here?

87

braced initialization please

ktras updated this revision to Diff 468655.Oct 18 2022, 12:16 PM

Make changes based on reviewer feedback: Add comments with numbered constraints and change an assignment statement to braced initialization.

ktras updated this revision to Diff 468660.Oct 18 2022, 12:25 PM

Move comment location.

ktras marked 2 inline comments as done.Oct 18 2022, 12:27 PM
ktras added inline comments.
flang/lib/Semantics/check-coarray.cpp
85

I have updated the patch and added comments with the numbered constraints.

ktras marked an inline comment as done.Oct 18 2022, 12:27 PM
klausler accepted this revision.Oct 25 2022, 9:08 AM
This revision is now accepted and ready to land.Oct 25 2022, 9:08 AM
This revision was automatically updated to reflect the committed changes.