This is an archive of the discontinued LLVM Phabricator instance.

Add semantics unit test for SYNC IMAGES statement
ClosedPublic

Authored by rouson on Feb 3 2022, 11:46 AM.

Details

Summary

Test a range of acceptable forms of SYNC IMAGES statements,
including combinations with and without the stat-variable
and errmsg-variable present. Also test that several invalid
forms of SYNC IMAGES call generate the correct error messages.

Diff Detail

Event Timeline

rouson created this revision.Feb 3 2022, 11:46 AM
rouson requested review of this revision.Feb 3 2022, 11:46 AM
ktras requested changes to this revision.Feb 9 2022, 4:17 PM

The variables superfluous_stat, superfluous_errmsg, co_indexed_integer, and co_indexed_character have not been declared and so you are testing different errors than I believe you intended to, but otherwise it looks good!

This revision now requires changes to proceed.Feb 9 2022, 4:17 PM
rouson updated this revision to Diff 407349.Feb 9 2022, 4:53 PM

Added variable declarations and expanded the variety of standard-conforming calls.

LGTM. The only note is that this test, like the sync all test in differential D114181, should pass if you take away the XFAIL directive, but doesn't because flang doesn't currently enforce the following constraints stated in the standard: C1171 - that no specifier shall appear more than once in a given sync-stat-list, and C1172 - that a stat-variable or errmsg-variable in a sync-stat shall not be a coindexed object, C1173 - that an image-set that is an int-expr shall be scalar or of rank one, and C1174 that the value of image-set shall not depend on the value of stat-variable or errmsg-variable. It seems appropriate to open up an issue on the github repository pointing this out after this commit is pushed, and referencing this test in the issue.

ktras accepted this revision.Feb 10 2022, 10:28 AM

See above comment.

This revision is now accepted and ready to land.Feb 10 2022, 10:28 AM
This revision was automatically updated to reflect the committed changes.