This is an archive of the discontinued LLVM Phabricator instance.

Write semantics test for FORM-TEAM statement.
ClosedPublic

Authored by hussainjk on Sep 19 2022, 11:56 AM.

Details

Summary

Write semantics tests for the FORM TEAM statement.

Diff Detail

Event Timeline

hussainjk created this revision.Sep 19 2022, 11:56 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
hussainjk requested review of this revision.Sep 19 2022, 11:56 AM
ktras added a comment.Sep 20 2022, 4:29 PM

The tests look great! Please see my inline comments for some suggestions. Also, I see that you are checking to make sure that type mismatches for the team-number, team-variable and the specifiers in the form-team-spec-list are caught, which is great. Since all of these are supposed to be scalar, what about checking that rank mismatches for team-number, team-variable and the specifiers are not allowed?

flang/test/Semantics/form_team01.f90
36
37

If it is your intention to have new_index be coindexed, the coarray reference needs to include an image-selector. See the suggested edit. For the image-selector, you can of course put a this_image() call or pick a different integer literal than the one I included in my suggested edit.

flang/test/Semantics/form_team01b.f90
17

See comment above about coindexing.

20

See comment above about coindexing.

hussainjk updated this revision to Diff 463576.Sep 28 2022, 8:47 AM

Addressing review comments.

The tests look great! Please see my inline comments for some suggestions. Also, I see that you are checking to make sure that type mismatches for the team-number, team-variable and the specifiers in the form-team-spec-list are caught, which is great. Since all of these are supposed to be scalar, what about checking that rank mismatches for team-number, team-variable and the specifiers are not allowed?

Addressed the comments and added the rank mismatch suggestions.

ktras accepted this revision.Sep 28 2022, 5:35 PM

LGTM.

Do you have commit permissions? Or do you need someone to commit on your behalf?

This revision is now accepted and ready to land.Sep 28 2022, 5:35 PM

LGTM.

Do you have commit permissions? Or do you need someone to commit on your behalf?

The latter, please.

ktras added a comment.Oct 3 2022, 8:49 AM

Okay, sounds great. I will commit this on your behalf.

This revision was automatically updated to reflect the committed changes.