[flang-commits] [PATCH] D126142: [flang] Allow more forward references to ENTRY names

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Sat May 21 22:08:18 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.

Forward references to ENTRY names to pass them as actual procedure arguments
don't work in all cases, exposing some basic ordering problems in
name resolution for these symbols.  Refactor; create all the
necessary procedure symbols, and either function result or host association
symbols (for subroutines), at the time that the subprogrma scope is
created, so that the names exist in the scope as text "before"
the ENTRY is processed in name resolution.  Some processing
remains in PostEntryStmt() so that we can check that an ENTRY with
an explicit distinct RESULT doesn't also have declarations for the
ENTRY name.


https://reviews.llvm.org/D126142

Files:
  flang/include/flang/Semantics/symbol.h
  flang/lib/Evaluate/tools.cpp
  flang/lib/Semantics/check-declarations.cpp
  flang/lib/Semantics/resolve-names.cpp
  flang/lib/Semantics/tools.cpp
  flang/test/Semantics/entry01.f90
  flang/test/Semantics/symbol20.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126142.431199.patch
Type: text/x-patch
Size: 30023 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220522/f79fd329/attachment-0001.bin>


More information about the flang-commits mailing list