[all-commits] [llvm/llvm-project] 7f680b: [flang] Allow more forward references to ENTRY names

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon May 23 21:48:56 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7f680b260ffe34c648cbd3fd16615d8f5cdab39f
      https://github.com/llvm/llvm-project/commit/7f680b260ffe34c648cbd3fd16615d8f5cdab39f
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2022-05-23 (Mon, 23 May 2022)

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

  Log Message:
  -----------
  [flang] Allow more forward references to ENTRY names

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.

Differential Revision: https://reviews.llvm.org/D126142




More information about the All-commits mailing list