This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix for broken/degenerate forall case
ClosedPublic

Authored by clementval on Jul 1 2022, 1:06 AM.

Details

Summary

Fix for broken/degenerate forall case where there is no assignment to an
array under the explicit iteration space. While this is a multiple
assignment, semantics only raises a warning.
The fix is to add a test that the explicit space has any sort of array
to be updated, and if not then the do_loop nest will not require a
terminator to forward array values to the next iteration.

This patch is part of the upstreaming effort from fir-dev branch.

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>

Diff Detail

Event Timeline

clementval created this revision.Jul 1 2022, 1:06 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 1 2022, 1:06 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Jul 1 2022, 1:06 AM
jeanPerier accepted this revision.Jul 1 2022, 1:14 AM
This revision is now accepted and ready to land.Jul 1 2022, 1:14 AM
This revision was automatically updated to reflect the committed changes.