[flang-commits] [PATCH] D113310: [flang] Distinguish error/warning cases for bad jumps into constructs

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Nov 5 12:32:56 PDT 2021


klausler created this revision.
klausler added a reviewer: schweitz.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
Herald added a reviewer: sscalpone.
klausler requested review of this revision.

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.


https://reviews.llvm.org/D113310

Files:
  flang/lib/Semantics/resolve-labels.cpp
  flang/test/Semantics/label05.f90
  flang/test/Semantics/label14.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113310.385155.patch
Type: text/x-patch
Size: 9098 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20211105/96c42487/attachment.bin>


More information about the flang-commits mailing list