This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix semantic analysis for "forall" targeted by "label"
ClosedPublic

Authored by peixin on Apr 8 2022, 2:45 AM.

Details

Summary

As Fortran 2018 3.18, the branch target statement can be
forall-construct-stmt, but cannot be forall-stmt. forall-stmt is
wrapped by Statement in action-stmt and action-stmt can be one
branch target statement. Fix the semantic analysis and add two
regression test cases in lowering.

Diff Detail

Event Timeline

peixin created this revision.Apr 8 2022, 2:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 8 2022, 2:45 AM
Herald added a subscriber: jdoerfert. · View Herald Transcript
peixin requested review of this revision.Apr 8 2022, 2:45 AM
This revision is now accepted and ready to land.Apr 8 2022, 4:14 AM
peixin added a comment.Apr 8 2022, 9:33 AM

@jeanPerier Do I need to check-pick this to fir-dev?

@jeanPerier Do I need to check-pick this to fir-dev?

Semantics single point of truth is LLVM. We cherry-pick semantic changes from time to time so that end to end testing can benefit from the fixes unit lowering upstreaming is finished.
So, it is nicer if do, but it is not critical (as opposed to all changes to lowering that must be synced back to fir-dev because we still consider it as the source of truth for lowering).

@jeanPerier Got it. Thanks for the explanation. I will leave this in LLVM. It can be cherry-picked together with others from time to time to save our time.