This is an archive of the discontinued LLVM Phabricator instance.

[flang] expand the num_images test coverage
ClosedPublic

Authored by rouson on Mar 17 2022, 11:28 AM.

Details

Summary

Add a test with a range of num_images() intrinsic function
invocations, including with the previously untested, standard-conforming
'team' argument. Also test that several non-conforming
num_images() invocations generate the correct error messages.

Diff Detail

Event Timeline

rouson created this revision.Mar 17 2022, 11:28 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: jdoerfert. · View Herald Transcript
rouson requested review of this revision.Mar 17 2022, 11:28 AM
ktras requested changes to this revision.Mar 30 2022, 4:04 PM

This test looks really good but both the team and team_number arguments must be scalars, so it might be helpful to add calls that violate this.

This revision now requires changes to proceed.Mar 30 2022, 4:04 PM
rouson updated this revision to Diff 419537.Mar 31 2022, 12:16 PM

Add semantically correct but not-yet-supported team_type argument checks.

ktras requested changes to this revision.Apr 6 2022, 3:22 PM

Since num_images() can have a single argument of team or team_number or no argument at all, adding the keyword arguments for these expected errors narrows the focus that you are trying to test that the team_number argument specifically shall not be a scalar and same with team. So I suggest adding these keyword arguments here.

flang/test/Semantics/num_images02.f90
37
41
This revision now requires changes to proceed.Apr 6 2022, 3:22 PM
rouson updated this revision to Diff 421045.Apr 6 2022, 4:48 PM

Add keyword arguments to two non-conforming calls.

rouson marked 2 inline comments as done.Apr 6 2022, 4:48 PM
ktras accepted this revision.Apr 7 2022, 10:10 AM

LGTM.

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