[flang-commits] [PATCH] D113696: [flang] Allow exterior branch to outermost WHERE construct statement

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Nov 11 10:47:29 PST 2021


klausler created this revision.
klausler added reviewers: schweitz, PeteSteinfeld.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
klausler requested review of this revision.

The labels of WHERE constructs were being created within the scope of
the construct, not the scope of its parent, leading to incorrect error
messages for branches to that label.


https://reviews.llvm.org/D113696

Files:
  flang/lib/Semantics/resolve-labels.cpp


Index: flang/lib/Semantics/resolve-labels.cpp
===================================================================
--- flang/lib/Semantics/resolve-labels.cpp
+++ flang/lib/Semantics/resolve-labels.cpp
@@ -229,7 +229,8 @@
     using LabeledConstructStmts = std::tuple<parser::AssociateStmt,
         parser::BlockStmt, parser::ChangeTeamStmt, parser::CriticalStmt,
         parser::IfThenStmt, parser::NonLabelDoStmt, parser::SelectCaseStmt,
-        parser::SelectRankStmt, parser::SelectTypeStmt>;
+        parser::SelectRankStmt, parser::SelectTypeStmt,
+        parser::WhereConstructStmt>;
     using LabeledConstructEndStmts = std::tuple<parser::EndAssociateStmt,
         parser::EndBlockStmt, parser::EndChangeTeamStmt,
         parser::EndCriticalStmt, parser::EndDoStmt, parser::EndForallStmt,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113696.386586.patch
Type: text/x-patch
Size: 802 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20211111/592f0fb1/attachment-0001.bin>


More information about the flang-commits mailing list