[flang-commits] [PATCH] D132679: [flang] Add nested scoping to label distinctness checking

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Aug 25 10:47:36 PDT 2022


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

Fortran defines derived type definitions and explicit interface
blocks for subroutines and functions to be nestable scopes for
statement labels, even though such labels are useless for all
purposes.  Handle these scopes in label resolution so that bogus
errors about conflicting labels in "real" code don't come out.

Note that BLOCK constructs could have also been defined as scopes
for statement labeling, but were not.


https://reviews.llvm.org/D132679

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132679.455648.patch
Type: text/x-patch
Size: 3311 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220825/e9f67891/attachment.bin>


More information about the flang-commits mailing list