[flang-commits] [PATCH] D139042: [flang] Check discrepancies between local & available global subprograms

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed Nov 30 14:33:44 PST 2022


klausler created this revision.
klausler added a reviewer: PeteSteinfeld.
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.

When a scope declares the name and perhaps some characteristics of
an external subprogram using any of the many means that Fortran supplies
for doing such a thing, and that external subprogram's definition is
available, check the local declaration against the external definition.
In particular, if the global definition's interface cannot be called
by means of an implicit interface, ensure that references are via an
explicit and compatible interface.

Further, extend call site checking so that when a local declaration
exists for a known global symbol and the arguments are valid for that
local declaration, the arguments are checked against the global's
interface, just are is already done when no local declaration exists.


https://reviews.llvm.org/D139042

Files:
  flang/include/flang/Semantics/symbol.h
  flang/include/flang/Semantics/tools.h
  flang/lib/Evaluate/tools.cpp
  flang/lib/Semantics/check-call.cpp
  flang/lib/Semantics/check-call.h
  flang/lib/Semantics/check-declarations.cpp
  flang/lib/Semantics/expression.cpp
  flang/lib/Semantics/symbol.cpp
  flang/lib/Semantics/tools.cpp
  flang/test/Semantics/global01.f90
  flang/test/Semantics/local-vs-global.f90
  flang/test/Semantics/procinterface01.f90
  flang/test/Semantics/resolve102.f90
  flang/test/Semantics/resolve53.f90
  flang/test/Semantics/resolve62.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139042.479070.patch
Type: text/x-patch
Size: 24186 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20221130/a76f862c/attachment-0001.bin>


More information about the flang-commits mailing list