This is an archive of the discontinued LLVM Phabricator instance.

[flang] Catch branching into FORALL/WHERE constructs
ClosedPublic

Authored by klausler on Sep 16 2021, 3:04 PM.

Details

Summary

Enforce constraints C1034 & C1038, which disallow the use
of otherwise valid statements as branch targets when they
appear in FORALL &/or WHERE constructs. (And make the
diagnostic message somewhat more user-friendly.)

Diff Detail

Event Timeline

klausler created this revision.Sep 16 2021, 3:04 PM
klausler requested review of this revision.Sep 16 2021, 3:04 PM
rovka added a subscriber: rovka.Sep 24 2021, 6:50 AM

Shouldn't you add new testcases with forall and where (and while you're at it, maybe also with select and the others that aren't covered by these 4 tests)?

flang/lib/Semantics/resolve-labels.cpp
230

Nitpick: I think this tuple was sorted alphabetically before.

klausler updated this revision to Diff 374903.Sep 24 2021, 10:37 AM

Address comments from Diana P.

klausler marked an inline comment as done.Sep 24 2021, 10:38 AM
klausler added a reviewer: rovka.
rovka accepted this revision.Sep 27 2021, 3:26 AM

LGTM, thanks.

This revision is now accepted and ready to land.Sep 27 2021, 3:26 AM
This revision was landed with ongoing or failed builds.Sep 27 2021, 10:52 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 27 2021, 10:52 AM