This is an archive of the discontinued LLVM Phabricator instance.

[flang] Distinguish error/warning cases for bad jumps into constructs
ClosedPublic

Authored by klausler on Nov 5 2021, 12:32 PM.

Details

Summary

Previously, jumps to labels in constructs from exterior statements
would elicit only a warning. Upgrade these to errors unless the
branch into the construct would enter into only DO, IF, and SELECT CASE
constructs, whose interiors don't scope variables or have other
set-up/tear-down semantics. Branches into these "safe" constructs
are still errors if they're nested in an unsafe construct that doesn't
also enclose the exterior branch statement.

Diff Detail

Event Timeline

klausler created this revision.Nov 5 2021, 12:32 PM
klausler requested review of this revision.Nov 5 2021, 12:32 PM
schweitz accepted this revision.Nov 5 2021, 6:16 PM

LGTM.

This revision is now accepted and ready to land.Nov 5 2021, 6:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 8 2021, 11:52 AM