This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix bogus branch target error on END SELECT
ClosedPublic

Authored by klausler on Jun 9 2022, 12:10 PM.

Details

Summary

The scope model used for branch target checking treats a label
on an END SELECT statement as if it were in the previous CASE block.
This makes it illegal to GO TO that label from within any earlier
CASE block in that statement. Fix by treating the CASE blocks as
nested scopes within the scope of the SELECT construct.

Also, add a "warning:" tag to related warning messages.

Diff Detail

Event Timeline

klausler created this revision.Jun 9 2022, 12:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2022, 12:10 PM
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.Jun 9 2022, 12:10 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jun 13 2022, 11:43 AM
This revision was automatically updated to reflect the committed changes.