[flang-commits] [PATCH] D126153: [flang] Process subprogram BIND(C, NAME=...) locally

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Sat May 21 22:18:56 PDT 2022


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

The scalar-default-character-expression that defines the interoperable
name of a function or subroutine (or interface) must have its names
resolved within the context of the subprogram, despite its appearance
on a function-stmt or a subroutine-stmt.  Failure to do so can lead
to bogus errors or to incorrect results.

The solution is to defer name resolution for function-stmt suffixes
(but not entry-stmt suffixes) and for subroutine-stmt language binding
specifications to EndSubprogram().  (Their resolution only need to be
deferred to the end of the specification part, but it's cleanest to
deal with it in EndSubprogram().)


https://reviews.llvm.org/D126153

Files:
  flang/lib/Semantics/resolve-names.cpp
  flang/test/Lower/program-units-fir-mangling.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126153.431210.patch
Type: text/x-patch
Size: 7929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220522/a81bcb75/attachment.bin>


More information about the flang-commits mailing list