This is an archive of the discontinued LLVM Phabricator instance.

[flang] Add a semantics test for co_max
ClosedPublic

Authored by rouson on Nov 2 2021, 10:47 PM.

Details

Summary

This patch checks for valid and invalid forms of calls to the collective subroutine co_max.

Diff Detail

Event Timeline

rouson created this revision.Nov 2 2021, 10:47 PM
Herald added a project: Restricted Project. · View Herald Transcript
rouson requested review of this revision.Nov 2 2021, 10:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 2 2021, 10:47 PM
Herald added a subscriber: jdoerfert. · View Herald Transcript
rouson updated this revision to Diff 384925.Nov 4 2021, 5:38 PM
  1. Add co_max test to expectedly failed list.
  2. Replaced non-ASCII characters.
  3. Correct expected error message.
  4. Update run directive to use test_errors.py.
ktras accepted this revision.Nov 17 2021, 3:05 PM

LGTM

This revision is now accepted and ready to land.Nov 17 2021, 3:05 PM
rouson updated this revision to Diff 391156.Dec 1 2021, 3:58 PM
rouson added a comment.Dec 1 2021, 4:05 PM

As suggested in Diff D113086, the updated diff

  1. Removes trailing whitespace if present.
  2. Cites the section of the standard that defines the co_max interface.
  3. Adds a check for an error in which the first co_max argument is coindexed.

The diff also adds checks for additional expected errors due to argument type mismatches.

rouson updated this revision to Diff 395006.Dec 16 2021, 2:54 PM
  1. Expand types tested for argument 'a'.
  2. Vary the types tested more throughout the test.
  3. Replace several "to be determined" error messages.
  4. Fix typo: remove extraneous comma.
  5. Clarify the "To Do" comment.
ktras accepted this revision.Dec 20 2021, 11:00 AM

Latest diff improves the breadth of the test. LGTM.

This revision was automatically updated to reflect the committed changes.